[tz] Java & Rearguard
Guy Harris
guy at alum.mit.edu
Tue Jun 11 20:14:49 UTC 2019
On Jun 11, 2019, at 1:51 AM, Andreas Schwab <schwab at suse.de> wrote:
> On Jun 07 2019, Paul Eggert <eggert at cs.ucla.edu> wrote:
>
>> On 6/6/19 2:49 AM, Andreas Schwab wrote:
>>> Just because the Ireland law calls it standard time doesn't mean it can't be summer time as well.
>>
>> POSIX doesn't have the notion of summer time; it has only standard time
>> and daylight saving time (also called "alternative time" in POSIX).
>
> That's what the rest of the world calls summer time.
That's what the part of the world that turns their clocks forward in spring and summer calls summer time.
Some parts of the world don't do seasonal adjustment, although they may do adjustments for Ramadan. (Are there any countries that do both seasonal adjustment *and* Ramadan adjustment *in the same year*?)
Other parts of the world, such as the country that occupies the bulk of an island slightly to the west of the island of Britain, appear to deem the time observed in spring and summer "standard time", and turn the clock backward in autumn and winter, calling that "winter time".
>> It's not unreasonable to use standard time in POSIX to represent standard
>> time in Ireland.
>
> No, it's unreasonable to break the world just because you can. GMT is
> standard time in Ireland during the winter,
Are you certain that the Irish government agrees with you here? Section 1 of the Standard Time Act, 1968:
http://www.irishstatutebook.ie/eli/1968/act/23/section/1/enacted/en/html#sec1
says
(1) The time for general purposes in the State (to be known as standard time) shall be one hour in advance of Greenwich mean time throughout the year, and any reference in any enactment or any legal document (whether passed or made before or after the passing of this Act) to a specified point of time shall be construed accordingly unless it is otherwise expressly provided.
(2) Any enactment expressed to operate or apply during a period of summer time shall be construed as operating or applying during the period prescribed as the period of summer time by the Summer Time Act, 1925 , and the Summer Time Order, 1926, that is to say, the period beginning at three o'clock in the morning of the day next following the third Saturday in the month of April or, if that day is Easter Day, beginning at that hour of the day next following the second Saturday in the month of April and, in either case, ending at that hour in the morning of the day next following the first Saturday in the month of October.
and section 1 of the Standard Time (Amendment) Act, 1971
http://www.irishstatutebook.ie/eli/1971/act/17/enacted/en/print#sec1
says
(1) (a) Notwithstanding section 1 (1) of the Standard Time Act, 1968, the time for general purposes in the State shall during a period of winter time be Greenwich mean time, and during such a period any reference in any enactment or any legal document (whether passed or made before or after the passing of this Act) to a specified point of time shall be construed accordingly unless it is otherwise expressly provided.
(b) The period beginning at two o'clock Greenwich mean time in the morning of the 31st day of October, 1971, and ending at two o'clock Greenwich mean time in the morning of the 19th day of March, 1972, shall for the purposes of this Act be a period of winter time.
(c) Subject to subsection (2) of this section, the period beginning at two o'clock Greenwich mean time in the morning of the Sunday following the fourth Saturday in October in any year after 1971 and ending either at two o'clock Greenwich mean time in the morning of the Sunday following the third Saturday in the month of March in the following year or, if the last-mentioned Sunday is Easter Day, at two o'clock Greenwich mean time in the morning of the Sunday following the second Saturday in the month of March in that year shall for the purposes of this Act be a period of winter time.
The latter Act doesn't speak of winter time as being "standard time", just as "the time for general purposes in the State".
> it doesn't make any sense to call that summer time.
No, it makes sense to call that winter time, as per the Standard Time (Amendment) Act, 1971.
One API that the tzdb must support is the C localtime()/mktime() API. As specified in ISO/IEC 9899:2011(E):
7.27.1 Components of time
The header <time.h> defines two macros, and declares several types and functions for manipulating time. Many functions deal with a calendar time that represents the current date (according to the Gregorian calendar) and time. Some functions deal with local time, which is the calendar time expressed for some specific time zone, and with Daylight Saving Time, which is a temporary change in the algorithm for determining local time. The local time zone and Daylight Saving Time are implementation-defined.
...
The value of tm_isdst is positive if Daylight Saving Time is in effect, zero if Daylight Saving Time is not in effect, and negative if the information is not available.
This is sufficiently vague (probably deliberately so) that:
turning clocks forward from standard time in spring and summer could be called "Daylight Saving Time";
turning clocks backward from standard time in autumn and winter could be called "Daylight Saving Time";
adjusting clocks for Ramadan could be called "Daylight Saving Time";
etc., as they all are "temporary change[s] in the algorithm for determining local time". That does raise the question of whether "permanent Daylight Saving Time" would count.
As has been noted earlier in this thread, the Single UNIX Specification 1) doesn't uniformly speak of "Daylight Saving Time" and 2) when it does, it's no clearer than the C standard about what it means. "Environment Variables":
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html
says, in the section on TZ:
The expanded format (for all TZ s whose value does not have a <colon> as the first character) is as follows:
stdoffset[dst[offset][,start[/time],end[/time]]]
Where:
std and dst
Indicate no less than three, nor more than {TZNAME_MAX}, bytes that are the designation for the standard (std) or the alternative (dst -such as Daylight Savings Time) timezone. Only std is required; if dst is missing, then the alternative time does not apply in this locale.
speaks only of an "alternative timezone", giving "Daylight Savings[sic] Time" as an example of an alternative timezone, while the section on <time.h>:
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html
says
The value of tm_isdst shall be positive if Daylight Savings Time is in effect, 0 if Daylight Savings Time is not in effect, and negative if the information is not available.
Paul Eggert has filed a bug against the Single UNIX Specification about this:
http://austingroupbugs.net/view.php?id=1253
If that's resolved, that will, I hope, let us know whether "tm_isdst == 1" means, in locations where clocks are turned forward in spring/summer and backward in autumn/winter, "clocks are in the spring/summer setting" or "clocks are adjusted from standard time as defined by law".
Now, it may be that, even if the resolution is that "tm_isdst == 1" means "clocks are in the spring/summer setting", so that the tzdb plus all C library implementations that use it must implement that behavior, there are *other* clients of the tzdb that need to provide an indication of whether the clock has been adjusted from standard time, in which case the tzdb would still need to treat Ireland differently, such that clocks are turned backward from standard time in the winter, even if the code that uses the tzdb to implement localtime()/mktime() needs to set tm_isdst to 1 during what is legally standard time.
More information about the tz
mailing list