zsh-workers
 help / color / mirror / code / Atom feed
From: Aaron Schrab <aaron@schrab.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Jordan Russell <jordan.likes.curry@gmail.com>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: _time_zone gives me candidates other than timezones
Date: Tue, 29 Mar 2022 20:12:28 -0400	[thread overview]
Message-ID: <YkOgbFr9VG+WCqi2@pug.qqx.org> (raw)
In-Reply-To: <CAH+w=7adn97N6Mzu_r5_ukqeZfXrE1sULzgVpbuT+NnfsxzvYA@mail.gmail.com>

At 16:22 -0700 29 Mar 2022, Bart Schaefer <schaefer@brasslantern.com> wrote:
>On Thu, Mar 24, 2022 at 12:28 PM Jordan Russell
><jordan.likes.curry@gmail.com> wrote:
>>
>> I would like _time_zone to exclude these filenames that are not
>> timezones [...]
>>
>> If I modify it to just exclude those files that begin with a lowercase
>> letter then it gives me only proper timezone names.
>
>That excludes the directories "posix" and "right" on my system (I have
>no idea what the latter one means).

Quoting from https://www.ucolick.org/~sla/leapsecs/right+gps.html:

    The "right" files in the tz (zoneinfo) database have a subtle 
    difference from the POSIX standard. POSIX requires that the system 
    clock value of time_t represent the number of non-leap seconds since 
    1970-01-01. This is the same as requiring POSIX seconds to be mean 
    solar seconds of UT, not the atomic seconds that UTC has counted 
    since 1972-01-01.

   The "right" zoneinfo files assert that the system clock value of 
   time_t represent the actual number of seconds in the internationally 
   approved broadcast time scale since 1970-01-01. As a result the value 
   of time_t which is expected by the "right" zoneinfo files is greater 
   than the value of time_t specified by POSIX. The difference in the 
   values of time_t is the number of leap seconds which have been 
   inserted into the internationally approved broadcast time scale. As of 
   year 2011 the difference is 24 seconds. 

I'm a bit more puzzled about why the separate `posix` directory exists. 
At least for my local time zone it doesn't seem to matter if I use that 
or leave it out; while using the `right` one definitely makes a 
difference:

date; TZ=right/America/New_York date; TZ=posix/America/New_York date
2022-03-29T20:07:47 EDT
2022-03-29T20:07:20 EDT
2022-03-29T20:07:47 EDT

>Is everyone OK with that?

While I don't think I've ever really needed to use zoneinfo entries from 
those directories, I'd certainly prefer they be offered for completion.


  reply	other threads:[~2022-03-30  0:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 18:36 Jordan Russell
2022-03-29 23:22 ` Bart Schaefer
2022-03-30  0:12   ` Aaron Schrab [this message]
2022-03-31 15:25     ` Jun. T
2022-04-05 23:18       ` Jordan Russell
2022-04-06 20:11         ` Bart Schaefer
2022-04-08  7:30           ` Jun T

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YkOgbFr9VG+WCqi2@pug.qqx.org \
    --to=aaron@schrab.com \
    --cc=jordan.likes.curry@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).