esselfe / chrono

Ncurses and/or X11 chronometer with optional milliseconds, pause, reset and countdown functions.
GNU General Public License v3.0
0 stars 0 forks source link

Daylight saving time problem #1

Closed esselfe closed 1 month ago

esselfe commented 3 years ago

I realized there might be a problem occuring when DST (Daylight Saving Time) and leap second occurs, poping or pushing the chrono time. This is because the current clock is polled in a mainloop and the changed time on the system might also apply to a running chrono! This could be desired considering the user's preferences but it doesn't reflect real timing. I currently have no plans into fixing this unless a briliant idea pops up, unfortunatly. Contributions welcome :)

esselfe commented 1 year ago

I think (with inspiration from some Youtube video: https://www.youtube.com/watch?v=-5wpm-gesOY) that it might be possible to use an incremental second counter rather than a timeval difference.

I was thinking that it should also be best to drop month counting and rely on years, days, hours, minutes, seconds and milliseconds only.

esselfe commented 1 month ago

Well I was wrong, the program uses gmtime(), not localtime().