nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: displaying Date using local timezone


From: Ralph Corderoy
Subject: Re: displaying Date using local timezone
Date: Mon, 03 May 2021 09:30:46 +0100

Hi Bob,

> >     $ TZ=Australia/Lord_Howe date -d '01 Aug'
> >     2021-08-01 00:00:00 +1030 Sun
> >     $ TZ=Australia/Lord_Howe date -d '01 Feb'
> >     2021-02-01 00:00:00 +1100 Mon
>
> Wat.  -_-##
>
> Why?!  I can see some localities deciding that having their time zone
> not be an integer number of hours offset can be more representative or
> useful for them

Yes, India is +05:30 with no DST.  And there are finer-grained ones,
e.g.

    $ tz() { printf '%s  %s\n' `TZ=$1 date +%z` $1; } 
    $ for t in UTC Australia/Eucla; do tz $t; done
    +0000  UTC
    +0845  Australia/Eucla
    $

Perhaps some known-to-fail tests could be added to nmh's test suite.

> but why mess with the DST offset, too?

In Lord Howe's case it's so its time agrees with the mainland half the
time.  Aussies.

Why bother with DST in the first place?  Isn't it a relic of the
pre-industrial era when farm labourers would rise by the sun to maximise
work on the land?

I didn't bother adjusting one year, initially by accident, and given
work was a bit flexible on hours it was quite simple to just adjust ‘my
truth’ of time to local time for the odd appointment, TV programme
schedule, etc.  Isn't the sudden switch for those that must live by the
state's clock meant to harm health?

> At this rate, they might as well just create a server that calculates
> the sun's position in the sky on a second-by-second basis and send out
> that time accordingly for people to sync their computers to.  -_-#

That occurred to me on the last switch and Google suggested its been
done by others.  Though I think it might be better to produce a local
time so my normal waking clock times are centred around the daylight.
:-)

DST is generally odd.  The Yanks mostly have DST.  But not in Arizona.
Except for Navajo Nation which is inside AZ.  But there's no DST in Hopi
Nation which is inside Navajo Nation.

    $ tz() { printf '%s  %s\n' "`TZ=$1 date '+%z %Z'`" $1; } 
    $ for t in America/{Phoenix,Shiprock}; do tz $t; done
    -0700 MST  America/Phoenix
    -0600 MDT  America/Shiprock
    $

And if you carry on up the Wakhjir Pass in Afghanistan then the clocks
will switch from +0430 to +0800 as you enter the People's Most
Democratic Uncensorious Republic of China.

-- 
Cheers, Ralph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]