[tz] Java & Rearguard

Guy Harris guy at alum.mit.edu
Fri May 31 16:49:58 UTC 2019


On May 31, 2019, at 6:52 AM, Brandon Smith <smith.b78987 at gmail.com> wrote:

> So what is the correct definition of DST or is there one?  If I review the sources linked from the IANA website itself [1], I again see the idea that DST is the process of advancing clocks forward [2] (page #2 and following).  Again, referencing timeanddate.com for Ireland [3] it shows a +1 hour (DST Start) in the Summer (i.e. GMT->IST) and -1 hour (DST End) in the winter (i.e. IST->GMT).  This seems to align with the idea that DST on is the period in which clocks were advanced forward.  I thought part of the broader issue and discussion here was that the tm_isdst flag is now true in winter for Ireland indicating they observe DST on in the winter and not the summer per this prior tz thread [4].

The definition of "daylight savings time" is up to dictionaries, convention, etc..  It generally appears to mean "the time used during some part of spring and summer, in order to give more hours of daylight in the evening and fewer hours of daylight in the morning".

"tm_isdst" was originally a UNIXism, so if there's anything that defines what *it* means, it's currently the Single UNIX Specification.  What the Single UNIX Specification page for <time.h>:

	https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html

says is

	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.

The law in the Republic of Ireland doesn't appear to use the term "daylight savings time", whether capitalized or not.  If the conventional meaning of "the time used during some part of spring and summer, in order to give more hours of daylight in the evening and fewer hours of daylight in the morning" applies, then "daylight savings time" is the time that is in effect during standard time in the Republic of Ireland, and "non-daylight savings time" is what's in effect during winter time.

This means that "non-daylight savings time", in the sense of "the time used during some part of autumn and winter, when we're not trying to get more hours of daylight in the evening", is not guaranteed to be the same as "standard time", in the sense of "the time designated by law as the standard time for that region".

So software that is to work for times for the Republic of Ireland, and that assumes that tm_isdst == 1 means "this time is during the period when clocks are turned forward from the autumn and winter time", *must not* assume that tm_isdst == 0 means "standard time".  Any code that assumes *both* of those, and that must work with Republic of Ireland times, is broken, and must be fixed, and there's nothing the tzdb can do to help.

The same applies to software that expects, in some other form, that, during some period of spring and summer, clocks are turned forward from "standard time" as defined by law, e.g. if it expects that the "offset from standard time as defined by law" is non-zero during "daylight savings time", or that the "standard time" offset from UTC is the offset in effect when "daylight savings time" is not in effect *and* is the offset during "standard time" as defined by law", or....

So the question is whether the tzdb should, for all tzdb regions, have "daylight savings time is in effect" mean "the clocks are offset from standard time as defined by law".  We *cannot* do that for the Europe/Dublin region, so we'd either have to have the tzdb notion of "standard time" mean "not daylight savings time" rather than "standard time as defined by law" or have "standard time" possibly be the the time when daylight savings time *is* in effect.


More information about the tz mailing list