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: Bob Carragher
Subject: Re: displaying Date using local timezone
Date: Mon, 03 May 2021 03:56:06 -0700

On Mon, 03 May 2021 09:30:46 +0100 Ralph Corderoy <ralph@inputplus.co.uk> sez:

> Hi Bob,

Hi Ralph,

This time you're not giving me happy-useful news.  B-D

> > >     $ 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
>     $

I had an inkling that it might be bad for NMH to try to handle
DST calculations on its own; hopefully it's not trying to do any
with time zones (but rather relying on system libraries that are
intended to figure out all that) ....

> 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.

More like "Humans."  B-)

> 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?

Nope:  it's a relic of the Industrial Age/WW1:

     https://en.wikipedia.org/wiki/Daylight_saving_time

> 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?

There are indications that, at least on the Monday after each
switchover, certain problems see spikes, such as car crashes and
heart attacks.  I personally wouldn't mind seeing DST eliminated.

> > 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.
> :-)

Well, that's what I meant:  depending on your longitude, the
server would give you a "local time," perhaps centered around the
daylight.  Though I also heard one proposal for just a universal
time (like UTC) that everyone uses (to avoid issues like "Is my
3pm your 10am or 11am?"), and you always do a conversion to
calculate your local time.  Both of these seem to require
computing devices, making it hard or impossible for us old fogeys
who still use _actual_ clocks.  B-)

> 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.

Like I said:  "Humans."  B-)

                                Bob



reply via email to

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