fix some errors, move to LocalTime, fix updating days count