Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Out of curiosity, how do modern systems handle DST outside its seasons e.g. “12/31 21:15 EDT”?


I think on most Linux systems a time string in a specific timezone is just a visual representation. Internally, times are kept as a number of seconds from 1/1/70 UTC midnight (with leap second adjustments if needed). When a user wants to convert to/from a timezone it is a simple addition for the timezone offset. EST adjustment is always 5 hours, EDT always 4.

You could in principle warn users that they are asking for a strange time, e.g. the one you indicated, but if the user wants to see it, why not.


I know on ubuntu servers i had to revert any DST/timezone settings and just keep everything in UTC. Because the systemd daemon for time didnt respect DST changes and would break services like kerberos.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: