/etc/localtime and How it Works
- Date: Tue, 12 Jun 2018 12:38:05 -0500
- From: "Martin McCormick" <martin.m@xxxxxxxxxxxxxx>
- Subject: /etc/localtime and How it Works
After getting curious about what all is in /etc/localtime, I
found out that one can read the binary with zdump. zdump -v
filename produces a number of lines that correspond to continuity
breaks such as the shift from standard time in Winter to Daylight
Saving Time or Summer Time.
I happen to live in the Central United States so
/etc/localtime is a copy of /usr/share/zoneinfo/America/Chicago
and zdump -v of this file shows about 450 lines showing the start
and end of DST from 1901 through 2038 when we run out of bits in
the current 32-bit counter.
One striking change is the switch to War Time that
started in February of 1942 and ended on August 14 of 1945 with
no modification of any kind between those two dates.
Some parts of the country actually added two hours of
time shifting in Summer and then dropped back to
War Time in the Winter. The Chicago file shows a single hour of
time shift during War time.
I looked at /usr/share/zoneinfo/America/New_York to see
what the Eastern Time Zone did and got a surprise. Instead of
450 odd lines, there are only 4 which basically describe the
1901-2038 life span of the file.
I was expecting America/New_York to look just like
America/Chicago except for the UTC offset and maybe some slightly
different dates back when DST was mostly used on the coasts and
not at all in much of the middle of the country.
Oklahoma and Texas, for example, didn't use any time
shifting except for War Time until 1967 after passage of the
Uniform Time Standards Act and a decision by all the major
television networks of the day to no longer send delayed
broadcasts down their wires to affiliates in states that didn't
So, my question is why is there such a difference between
the two files and how do people in the Eastern Time Zone
automatically learn of the two time shifts each year?