Liste des Groupes | Revenir à col advocacy |
Something Unix did that was different from most other OSes was, its systemI NEVER trust Linux to keep time. I've encountered several occurrences of it dropping 5-7 minutes over a 1-hour period.
clock kept time in UTC (or GMT, in pre-UTC days). Linux does the same.
When you use a command like “date” to see what the current date and time
is, it converts that UTC time to a local time in some specified timezone.
Changing the timezone is as easy as specifying a new value for the TZ
environment variable.
Windows, on the other hand, keeps its system clock in local time, in some
specific time zone that is assumed to apply systemwide.
This is a particularly dumb idea when you realize how much it complicates
things if your time zone has daylight saving time. We have seen this sort
of thing happen on Windows systems before, where they might forget to
adjust the clock to start/stop daylight saving, or even adjust it twice so
you end up being an hour off in the opposite direction.
This can’t happen on Linux systems, because there is no turning daylight
saving “on” or “off” as such: there is simply a table of local time
offsets (from the “tzdata” files), and the correct offset to apply depends
only on the actual UTC time value, not on the current setting of any
system flag.
This also makes it easy to convert between UTC and local times at any time
in the past, for any time zone.
Les messages affichés proviennent d'usenet.