On 12/6/23 15:41, David Wright wrote:
On Wed 06 Dec 2023 at 13:27:40 (-0500), Greg Wooledge wrote:
On Wed, Dec 06, 2023 at 01:02:45PM -0500, Pocket wrote:
TZ=POSIX;date
Wed Dec 6 18:00:38 POSIX 2023
"POSIX" is not a valid timezone name in Debian 12. Therefore you're
just seeing UTC here. Giving an invalid TZ always gives you UTC, but
with whatever crazy-ass name you used echoed back at you, to give you
the illusion that your name was valid. It's a *huge* pitfall. I've been
bit by this myself.
TZ=America/New_York;date
Wed Dec 6 13:00:21 EST 2023
TZ=EST5DST;date
Wed Dec 6 13:01:10 EST 2023
What is the problem?
Gods DAMN it. I didn't want to have to dig through these stupid zone
dumps, but you're FORCING my hand.
unicorn:~$ zdump -v -c 1918,1950 EST5EDT
EST5EDT -9223372036854775808 = NULL
EST5EDT -9223372036854689408 = NULL
AAAAAAAA
EST5EDT Sun Mar 31 06:59:59 1918 UT = Sun Mar 31 01:59:59 1918 EST isdst=0
gmtoff=-18000
EST5EDT Sun Mar 31 07:00:00 1918 UT = Sun Mar 31 03:00:00 1918 EDT isdst=1
gmtoff=-14400
EST5EDT Sun Oct 27 05:59:59 1918 UT = Sun Oct 27 01:59:59 1918 EDT isdst=1
gmtoff=-14400
EST5EDT Sun Oct 27 06:00:00 1918 UT = Sun Oct 27 01:00:00 1918 EST isdst=0
gmtoff=-18000
EST5EDT Sun Mar 30 06:59:59 1919 UT = Sun Mar 30 01:59:59 1919 EST isdst=0
gmtoff=-18000
EST5EDT Sun Mar 30 07:00:00 1919 UT = Sun Mar 30 03:00:00 1919 EDT isdst=1
gmtoff=-14400
EST5EDT Sun Oct 26 05:59:59 1919 UT = Sun Oct 26 01:59:59 1919 EDT isdst=1
gmtoff=-14400
EST5EDT Sun Oct 26 06:00:00 1919 UT = Sun Oct 26 01:00:00 1919 EST isdst=0
gmtoff=-18000
BBBBBBBB
EST5EDT Mon Feb 9 06:59:59 1942 UT = Mon Feb 9 01:59:59 1942 EST isdst=0
gmtoff=-18000
EST5EDT Mon Feb 9 07:00:00 1942 UT = Mon Feb 9 03:00:00 1942 EWT isdst=1
gmtoff=-14400
EST5EDT Tue Aug 14 22:59:59 1945 UT = Tue Aug 14 18:59:59 1945 EWT isdst=1
gmtoff=-14400
EST5EDT Tue Aug 14 23:00:00 1945 UT = Tue Aug 14 19:00:00 1945 EPT isdst=1
gmtoff=-14400
EST5EDT Sun Sep 30 05:59:59 1945 UT = Sun Sep 30 01:59:59 1945 EPT isdst=1
gmtoff=-14400
EST5EDT Sun Sep 30 06:00:00 1945 UT = Sun Sep 30 01:00:00 1945 EST isdst=0
gmtoff=-18000
CCCCCCCC
EST5EDT 9223372036854689407 = NULL
EST5EDT 9223372036854775807 = NULL
OK? There's dump number one. Now let's compare to dump number two:
unicorn:~$ zdump -v -c 1918,1950 America/New_York
America/New_York -9223372036854775808 = NULL
America/New_York -9223372036854689408 = NULL
America/New_York Sun Mar 31 06:59:59 1918 UT = Sun Mar 31 01:59:59 1918 EST
isdst=0 gmtoff=-18000
America/New_York Sun Mar 31 07:00:00 1918 UT = Sun Mar 31 03:00:00 1918 EDT
isdst=1 gmtoff=-14400
America/New_York Sun Oct 27 05:59:59 1918 UT = Sun Oct 27 01:59:59 1918 EDT
isdst=1 gmtoff=-14400
America/New_York Sun Oct 27 06:00:00 1918 UT = Sun Oct 27 01:00:00 1918 EST
isdst=0 gmtoff=-18000
America/New_York Sun Mar 30 06:59:59 1919 UT = Sun Mar 30 01:59:59 1919 EST
isdst=0 gmtoff=-18000
America/New_York Sun Mar 30 07:00:00 1919 UT = Sun Mar 30 03:00:00 1919 EDT
isdst=1 gmtoff=-14400
America/New_York Sun Oct 26 05:59:59 1919 UT = Sun Oct 26 01:59:59 1919 EDT
isdst=1 gmtoff=-14400
America/New_York Sun Oct 26 06:00:00 1919 UT = Sun Oct 26 01:00:00 1919 EST
isdst=0 gmtoff=-18000
America/New_York Sun Mar 28 06:59:59 1920 UT = Sun Mar 28 01:59:59 1920 EST
isdst=0 gmtoff=-18000
America/New_York Sun Mar 28 07:00:00 1920 UT = Sun Mar 28 03:00:00 1920 EDT
isdst=1 gmtoff=-14400
America/New_York Sun Oct 31 05:59:59 1920 UT = Sun Oct 31 01:59:59 1920 EDT
isdst=1 gmtoff=-14400
America/New_York Sun Oct 31 06:00:00 1920 UT = Sun Oct 31 01:00:00 1920 EST
isdst=0 gmtoff=-18000
[...]
I'm truncating this one because it's much longer. Apparently this one
shows every year, even if there are no DST rule changes that year. What
does this mean? Hell if I know.
Comparing zdump -v America/New_York | cut -b 19- > /tmp/a-ny
with zdump -v EST5EDT | cut -b 10- > /tmp/e5e
shows that the former starts at 1883 (no changes then until 1918,
AAAAAAAA above), and the latter omits the period 1920–1966, except
for War Time and Peace Time (between BBBBBBBB and CCCCCCCC).
Because DST was not in force/usage except the metro NYC. Every where
else didn't use/have it.
That makes EST5DST correct except for NYC and America/New_York
completely incorrect except of course NYC.
Which is why I prefer to use EST5DST
BTW there isn't any timezone called America/New_York, it is or course
the Eastern Standard Time Zone.
America/New_your should actually be called America/Eastern. The POSIX
EST5DST is closer to being correct.
I've expanded my guesses as to why. I had thought that it might be
because the "Unix System V approach from New Jersey (insert
appropriate booing for best effect)" implied that NJ didn't observe
DST over that period, but perhaps it's just that there's no way to
determine single dates for changing the clocks.
"Having rallied the general public's support, the Time Uniformity
Committee's goal was accomplished, but only after discovering and
disclosing that on the 35-mile stretch of highway (Route 2) between
Moundsville, W.V., and Steubenville, Ohio, every bus driver and his
passengers had to endure seven time changes!"
https://www.webexhibits.org//daylightsaving/e.html
Cheers,
David.
--
It's not easy to be me