[tz] Extra transition for Europe/London with 2023d

Guy Harris gharris at sonic.net
Sat Jan 6 22:51:14 UTC 2024


On Jan 6, 2024, at 1:48 PM, Brooks Harris via tz <tz at iana.org> wrote:

> On 1/6/2024 3:31 PM, Paul Eggert wrote:
> 
>> On 2024-01-06 09:55, Brooks Harris via tz wrote:
>> 
>>> in many situations, such as STDOFF shifts, STDOFF shifts simultaneous with DST shifts, or "double summertime" the TzIf values are essentially 'lying'
> 
> Sorry. "Lying" might be the wrong word, didn't mean to insult TzDb. I just meant the values of gmtoff and stdoff are adjusted to satisfy Posix-time rather than reflect the values in the source files.

POSIX's time API has no notion of "gmtoff" and "stdoff".  What it has is a global variable named "timezone" which, as per my earlier mail, is described in the Single UNIX Specification thus:

	The external variable timezone shall be set to the difference, in seconds, between Coordinated Universal Time (UTC) and local standard time.

This came from System V; the System V Interface Definition, Issue 2, Volume 1:

	http://bitsavers.org/pdf/att/unix/SVID/System_V_Interface_Definition_Issue_2_Volume_1_1986.pdf

says, on page 162, that

	The external long variable timezone contains the difference, in seconds, between GMT and local standard time (in EST, timezone is 5*60*60); the external variable daylight is non-zero only if the standard USA Daylight Savings Time conversion should be applied.

What the System V Release 3.1 code

	https://archive.org/download/ATTUNIXSystemVRelease4Version2

(ignore the title, it has older versions) does is to set timezone to the offset as specified in the TZ environment variable, which means it's "the difference, in seconds, between GMT and local standard time", e.g., if TZ is set to EST5EDT, it's set to 5*60*60, and stays there, even if the system, or the time that was last converted, is currently in DST.

What our code does, in update_tzname_etc(), is

	#if USG_COMPAT
	  if (!ttisp->tt_isdst)
	    timezone = - ttisp->tt_utoff;
	#endif

which means that, if and only if the entry handed to it is for "non-DST" time, it sets timezone to the offset from UTC.  ("USG_COMPAT" refers to the UNIX Support Group in AT&T, which was the group that produced the System {Roman Numeral} releases, before it became, as I remember, the UNIX System Development Laboratory.  At the time, UN*Xes were generally called either "BSD" or "USG", depending on which particular flavor they were, although a lot of commercial UN*Xes picked up features, including APIs, from both.)

I'm not sure what "reflect the values in the source files" means, given that, for a given timezone, there could be *multiple* values of "the difference, in seconds, between Coordinated Universal Time (UTC) and local standard time".  Either there's only one value for the timezone, in which case ttisp->tt_utoff, for all ttisp->tt_isdst, has the same value, and all "adjustments" just set timezone to the value it already has, or there's more than one value, in which case there's no indication of what either "[setting it] to the difference, in seconds, between Coordinated Universal Time (UTC) and local standard time" or "[reflecting] the values in the source files" would mean.




More information about the tz mailing list