public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Florian Weimer <fweimer@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] manual: Add more documentation for the tm_isdst member of struct tm
Date: Tue, 25 Oct 2022 10:49:12 -0700	[thread overview]
Message-ID: <68a8ff7f-75af-7e58-5f6e-0357eb76fc6a@cs.ucla.edu> (raw)
In-Reply-To: <87r0yx0vtc.fsf@oldenburg.str.redhat.com>

On 2022-10-24 14:13, Florian Weimer wrote:
> that's rather inconsistent with civilian use.

It depends on which civilians you talk to. Irish legislation says that 
IST (UTC+01) is Irish Standard Time, and that Ireland observes "winter 
time" (i.e., negative daylight saving offset) during winter. Irish 
winter time is called "Greenwich mean time". See:

https://github.com/eggert/tz/blob/main/europe#L359
https://www.irishstatutebook.ie/eli/1971/act/17/enacted/en/print

There's something similar in Morocco, though in their case it's Ramadan 
time not winter time.


> why isn't isdst zero during the winter as well?

Because Irish daylight saving time is observed in winter not summer. 
Also, if tm_isdst were always zero, it'd be harder for mktime to 
disambiguate Irish timestamps.

POSIX requires support for this sort of thing. Even if TZDB's 
Europe/Dublin entry were changed to disagree with Irish legislation, 
glibc would still need to support settings like this:

TZ='IST-1GMT0,M10.5.0,M3.5.0/1'

This POSIX-conforming TZ setting follows current Irish practice and 
specifies negative DST during winter.

Perhaps we could mention this possibility in the manual.

PS. While we're on the subject of documentation, perhaps we should also 
mention that mktime can use tm_gmtoff to disambiguate 
otherwise-ambiguous time stamps. This is reliable even for situations 
like Volgograd in 2020, and it conforms to POSIX. A bit tricky to 
document, though.

  reply	other threads:[~2022-10-25 17:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 12:51 Florian Weimer
2022-10-24 19:44 ` Paul Eggert
2022-10-24 21:13   ` Florian Weimer
2022-10-25 17:49     ` Paul Eggert [this message]
2022-10-25 18:07       ` Florian Weimer
2022-10-25 18:27         ` Paul Eggert
2022-10-26 11:21           ` Florian Weimer
2022-10-26 19:05             ` Paul Eggert
2022-10-27 10:09               ` Florian Weimer

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=68a8ff7f-75af-7e58-5f6e-0357eb76fc6a@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).