Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #229049

Re: 780 files in /usr/share/zoneinfo/

From Michael Stone <mstone@debian.org>
Newsgroups linux.debian.user
Subject Re: 780 files in /usr/share/zoneinfo/
Date 2020-11-25 03:00 +0100
Message-ID <BeSga-1FS-3@gated-at.bofh.it> (permalink)
References (2 earlier) <BeGf0-37C-9@gated-at.bofh.it> <BeJcS-4Rz-13@gated-at.bofh.it> <BeJmx-4UN-1@gated-at.bofh.it> <BeJZf-5nc-5@gated-at.bofh.it> <BeKVj-5Vy-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Nov 24, 2020 at 01:07:10PM -0500, Greg Wooledge wrote:
>As I said, figuring out the valid TZ strings for a given location on
>our planet is a challenge.  Unfortunately, the ... fine people ... who
>devised the standards for this sort of thing thought it would be really
>super clever to treat ALL unknown TZ strings as if they were "UTC0".

It's the result of a layering of standards. The old pre-TZ-file way of 
doing things parsed the TZ string to create the rule. You can call your 
timezones anything you want (you're making the rule!) and the degenerate 
case has a zero offset.

>unicorn:~$ TZ=PST date ; TZ=PST8PDT date ; TZ=America/Los_Angeles date
>Tue Nov 24 17:56:16 PST 2020
>Tue Nov 24 09:56:16 PST 2020
>Tue Nov 24 09:56:16 PST 2020
>
>To add insult to injury, the string that date(1) gives you as OUTPUT
>(in this case, "PST") is not accepted by the very same program as INPUT.
>In fact, I don't know of any way to get date(1) to give an output string
>that you can use as a valid TZ input string.

> date ; date --iso=seconds ; date --iso=seconds -d `date --iso=seconds`
Tue 24 Nov 2020 08:50:29 PM EST
2020-11-24T20:50:29-05:00
2020-11-24T20:50:29-05:00

Just use numeric timezone offsets for anything being done 
programatically. It's not possible to use human-friendly timezone names 
for that because they're ambiguous. 

And use ISO8601 format for everything. Seriously, everything.

>Outside of the USA, you'll probably need to go with the "nearest big
>city" names that are the current vogue.  The best way to use those is
>probably "ls /usr/share/zoneinfo", choose your continent, and then
>(for example) "ls /usr/share/zoneinfo/Asia".  Then pick a city from
>the resulting set, and pray.
>
>If there's a better way, I don't know it.

most people just configuring their time zone using their gui 
configuration manager. if you choose not to do it that way then yeah, 
you'll have to do some research. also, as suggested upthread, most 
people do this at install time and never touch it again.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

780 files in /usr/share/zoneinfo/ mike.junk.46@att.net - 2020-11-21 03:50 +0100
  Re: 780 files in /usr/share/zoneinfo/ Andy Smith <andy@strugglers.net> - 2020-11-21 04:10 +0100
  Re: 780 files in /usr/share/zoneinfo/ John Hasler <jhasler@newsguy.com> - 2020-11-21 04:20 +0100
    Re: 780 files in /usr/share/zoneinfo/ Paul Johnson <baloo@ursamundi.org> - 2020-11-21 04:30 +0100
  Re: 780 files in /usr/share/zoneinfo/ <tomas@tuxteam.de> - 2020-11-21 10:00 +0100
    Re: 780 files in /usr/share/zoneinfo/ "Martin McCormick" <martin.m@suddenlink.net> - 2020-11-21 20:30 +0100
      Re: 780 files in /usr/share/zoneinfo/ Andy Smith <andy@strugglers.net> - 2020-11-21 22:40 +0100
        Re: 780 files in /usr/share/zoneinfo/ Stefan Monnier <monnier@iro.umontreal.ca> - 2020-11-21 22:50 +0100
        Re: 780 files in /usr/share/zoneinfo/ "Martin McCormick" <martin.m@suddenlink.net> - 2020-11-22 03:50 +0100
          Re: 780 files in /usr/share/zoneinfo/ Andy Smith <andy@strugglers.net> - 2020-11-22 05:30 +0100
            rsync link corruption with -H and --link-dest "Gareth Evans" <donotspam@fastmail.fm> - 2020-11-22 05:50 +0100
            Re: 780 files in /usr/share/zoneinfo/ "Martin McCormick" <martin.m@suddenlink.net> - 2020-11-30 13:20 +0100
      Re: 780 files in /usr/share/zoneinfo/ Charles Curley <charlescurley@charlescurley.com> - 2020-11-21 23:10 +0100
      Re: Re: 780 files in /usr/share/zoneinfo/ Greg Wooledge <wooledg@eeg.ccf.org> - 2020-11-23 14:00 +0100
        Re: 780 files in /usr/share/zoneinfo/ Charles Curley <charlescurley@charlescurley.com> - 2020-11-23 16:50 +0100
        Re: Re: 780 files in /usr/share/zoneinfo/ Mike McClain <mike.junk.46@att.net> - 2020-11-24 06:50 +0100
          Re: 780 files in /usr/share/zoneinfo/ Greg Wooledge <wooledg@eeg.ccf.org> - 2020-11-24 14:10 +0100
            Re: 780 files in /usr/share/zoneinfo/ rhkramer@gmail.com - 2020-11-24 17:20 +0100
              Re: 780 files in /usr/share/zoneinfo/ John Hasler <jhasler@newsguy.com> - 2020-11-24 17:30 +0100
                Re: 780 files in /usr/share/zoneinfo/ Curt <curty@free.fr> - 2020-11-24 18:10 +0100
                Re: 780 files in /usr/share/zoneinfo/ Greg Wooledge <wooledg@eeg.ccf.org> - 2020-11-24 19:10 +0100
                Re: 780 files in /usr/share/zoneinfo/ rhkramer@gmail.com - 2020-11-24 19:40 +0100
                Re: 780 files in /usr/share/zoneinfo/ David Wright <deblis@lionunicorn.co.uk> - 2020-11-24 20:50 +0100
                Re: 780 files in /usr/share/zoneinfo/ Michael Stone <mstone@debian.org> - 2020-11-25 03:00 +0100
          Re: 780 files in /usr/share/zoneinfo/ Stefan Monnier <monnier@iro.umontreal.ca> - 2020-11-24 15:50 +0100
          Re: Re: 780 files in /usr/share/zoneinfo/ Michael Stone <mstone@debian.org> - 2020-11-24 17:10 +0100
            Re: 780 files in /usr/share/zoneinfo/ "Martin McCormick" <martin.m@suddenlink.net> - 2020-11-30 14:10 +0100
          Re: 780 files in /usr/share/zoneinfo/ John Hasler <jhasler@newsguy.com> - 2020-11-24 17:20 +0100
            Re: 780 files in /usr/share/zoneinfo/ Gene Heskett <gheskett@shentel.net> - 2020-11-24 18:20 +0100
          Re: 780 files in /usr/share/zoneinfo/ David Wright <deblis@lionunicorn.co.uk> - 2020-11-24 20:50 +0100
  Re: 780 files in /usr/share/zoneinfo/ David Wright <deblis@lionunicorn.co.uk> - 2020-11-22 00:00 +0100

csiph-web