[tz] Java & Rearguard

Stephen Colebourne scolebourne at joda.org
Sat Jun 1 10:08:14 UTC 2019


On Fri, 31 May 2019 at 17:50, Guy Harris <guy at alum.mit.edu> wrote:
> 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".
> ...
> 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".

FWIW, I agree with this. As mentioned in my last response, the Java
ZoneRules class uses the term "standard offset" while the older class
uses "raw offset" (which may well be a better term). AFAICT, nothing
in the JDK promises the offset values are directly linked to the legal
definition the country uses.

> 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.

Exactly. There is a choice here. Either way is justifiable. And zdb
hanged from one choice to the other which is why we have been having
the discussion/pain.

Stephen

PS. The older API has this table of min/max values for DST offset
which rejects negative values:
http://hg.openjdk.java.net/jdk/jdk/file/db105c4c5776/src/java.base/share/classes/java/util/GregorianCalendar.java#l415



More information about the tz mailing list