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

Re: ntpsec as server questions



On Tue 05 Dec 2023 at 23:37:31 (+0700), Max Nikulin wrote:
> On 05/12/2023 05:14, Pocket wrote:
> > For gene..................................................................
> [...]
> > zone=EST5EDT
> > zoneinfo=/usr/share/zoneinfo
> > localtime=/etc/localtime
> > timezone=/etc/timezone
> > profile=/etc/profile.d
> > if [ -e "$zoneinfo"/"$zone" ];then
> >      ln -sf "$zoneinfo"/"$zone" "$localtime"
> > else
> >      printf "%s\n" "Invalid zone: $zoneinfo/$zone"
> >      exit 1
> > fi
> > printf "%s\n" "$zone" > "$timezone"
> > printf "%s\n" "TZ=$zone;export TZ" > "$profile"/timezone.sh
> 
> To set /etc/localtime and /etc/timezone I would recommend the command
> that has been repeated several times in this thread:
> 
>      dpkg-reconfigure tzdata
> 
> And I would recommend against setting the TZ environment variable
> unless it is really necessary. If somebody needs it then it is better
> to do it in /etc/environment.d as well. KDE has its own GUI to set
> user-specific timezone, but I am unsure if selected value will be
> applied in the case of console or ssh login.
> 
> I am surprised that POSIX EST5EDT timezone has irregularities at least
> as it is implemented in GNU libc. I believed that it specifies just
> standard and summer time.

During WWII they had War Time, just as Britain had Double Summer Time,
with Summer Time through the winters.

  $ for j in America/New_York EST5EDT Europe/London;\
  > do TZ="$j" date -d @$(TZ=UT date +'%s' -d '1940-01-01'); done
  Sun Dec 31 19:00:00 EST 1939
  Sun Dec 31 19:00:00 EST 1939
  Mon Jan  1 00:00:00 GMT 1940
  $ for j in America/New_York EST5EDT Europe/London;\
  > do TZ="$j" date -d @$(TZ=UT date +'%s' -d '1943-01-01'); done
  Thu Dec 31 20:00:00 EWT 1942
  Thu Dec 31 20:00:00 EWT 1942
  Fri Jan  1 01:00:00 BST 1943
  $ for j in America/New_York EST5EDT Europe/London;\
  > do TZ="$j" date -d @$(TZ=UT date +'%s' -d '1943-06-01'); done
  Mon May 31 20:00:00 EWT 1943
  Mon May 31 20:00:00 EWT 1943
  Tue Jun  1 02:00:00 BDST 1943
  $ 

But there are periods when the timezones America/New_York and EST5EDT
diverge:

  $ for j in America/New_York EST5EDT;\
  > do TZ="$j" date -d @$(TZ=UT date +'%s' -d '1966-06-24');done
  Thu Jun 23 20:00:00 EDT 1966
  Thu Jun 23 19:00:00 EST 1966
  $

> However since these rules are specific to US, I would prefer IANA
> identifiers like America/New_York.

I don't know who maintains the legacy EST5EDT zone, or for whom;
the quotation below suggests that it may just follow New Jersey.
For a long period after the war, it seems the timezones in the US
were all over the place.

> https://naggum.no/lugm-time.html
> Erik Naggum. A Long, Painful History of Time. 1999
> > 8.2 Timezone Representation
> > 
> > David Ols[o]n of Digital Equipment Corporation has laid down a tremendous
> > amount of work in collecting the timezones of the world and their
> > daylight saving time boundaries. Contrary to the Unix System V approach
> > from New Jersey (insert appropriate booing for best effect), which
> > codifies a daylight saving time regime only for the current year, and
> > apply it to all years, David Ols[o]n's approach is to maintain tables of
> > all the timezone changes.

Cheers,
David.


Reply to: