[tz] Java & Rearguard

Brandon Smith smith.b78987 at gmail.com
Thu May 30 14:26:53 UTC 2019


>> I predict that significant libraries and implementations will be on
rearguard forever; if that is not maintained by the TZDB, the it would be
cloned and maintained externally with rearguard modifications. The cost of
doing anything else would be prohibitive.

My company has not been able to adapt to the new negative offsets as well
and has been relying upon rearguard up to this point, given it breaks our
application behavior (note C++ in our case).

The problem as I see it is around the definition of 'what is daylight
saving time', and the implementation of negative DST offsets changes that
definition as far as I can tell.  Wikipedia describes it as such "Daylight
saving time (DST), also daylight savings time or daylight time (United
States) and summer time (United Kingdom, European Union, and others), is
the practice of advancing clocks during summer months so that evening
daylight lasts longer, while sacrificing normal sunrise times."  [1]
timeanddate.com describes it as "Daylight Saving Time (DST) is the practice
of setting the clocks forward one hour from standard time during the summer
months, and back again in the fall, in order to make better use of natural
daylight." [2].  The commonality there being "advance clocks".

Perhaps not everyone agrees that those are reliable sources.  But I think
the reality is that much if not most of the software industry views them as
such.  So as others seem to be suggesting to me, libraries and applications
have forever been written based on the definition and understand that
clocks move forward with DST transitions.  I know it has been said that
this is a 'bad assumption', but the reality as I see it is that generally
speaking all software has been written based upon what developers knew to
be a 'definition' and not an 'assumption' at all.

So not only are we talking about incompatibilities with all the
software/parsers involved with the libraries themselves (e.g. joda time),
we are also talking about all software utilizing those libraries who have
to account for various use cases that rely upon these "definitions".

As a side note, my company is highly impacted by the Brazil changes and I
know it was alluded to that TZDB could perhaps use the next release to
force the hand of the negative dst offset discussion (i.e. remove
rearguard).  I would strongly request that we not do that given the number
of requests by others for an updated Brazil release as well as the amount
of compatibility concerns mentioned here with negative offsets.

[1] https://en.wikipedia.org/wiki/Daylight_saving_time
[2] https://www.timeanddate.com/time/dst/


On Thu, May 30, 2019 at 8:51 AM Mark Davis ☕️ <mark at macchiato.com> wrote:

> > the most common (standard) time
>
> I predict that significant libraries and implementations will be on
> rearguard forever; if that is not maintained by the TZDB, the it would be
> cloned and maintained externally with rearguard modifications. The cost of
> doing anything else would be prohibitive.
>
> And there was really no reason whatsoever for changing policies. If we
> have a timezone with two separate offsets, one an hour ahead of the other,
> then the TZDB can chose to represent them as <0, 1> or as <-1, 0>. It is
> needless to have both in the database. For consistency one can simply
> decide to have them all be positive, which was the longstanding policy of
> this group until recently.
>
> The *name* of the time variants might use "standard" or "winter" or "lětni
> čas" or "夏時間", whatever is appropriate to the user's locale. There is no
> requirement that any two locales be aligned in what they call the "hour
> ahead" variant or the "hour behind" variant. The names attached to the
> variant by a given locale is really outside of the scope of the TZDB.
>
> Changing the policy to allow <-1, 0> has no particular practical benefit,
> and has just caused compatibility difficulties. You can't just wave a magic
> wand and expect longstanding APIs to return different values without
> causing problems for users.
>
> Mark
>
> And BTW, in most timezones around the world, a majority of the days in the
> year are on "daylight" time, so it is the ‘most common one’.
>
>
> On Thu, May 30, 2019 at 2:04 PM Robert Elz <kre at munnari.oz.au> wrote:
>
>>     Date:        Thu, 30 May 2019 11:54:35 +0100
>>     From:        Stephen Colebourne <scolebourne at joda.org>
>>     Message-ID:  <
>> CACzrW9CXTRW_G07E2Y-b2Q4+Ew5jt8LcFSrzR-YSg0gT-0SCTw at mail.gmail.com>
>>
>>   | Finally I'll note that *both* views of the data are sensible and
>> reasonable:
>>   | - offset-focus: base/standard time in winter, advanced/daylight time
>>   | in summer (Java's choice and tzdb's old choice)
>>
>> tzdb never made such a choice - it simply didn't have any data that
>> happened to have the most common (standard) time advanced ahead of
>> the less common offset.
>>
>> What are you planning to do when some part of the US (say Illinois, or
>> something else on Central time) decides to set their zone backwards by
>> an hour for a month in the middle of winter - perhaps the winter olympics
>> come to Denver or something, and they decide that being in the same
>> timezone for that period has more economic and social wins than being
>> an hour off the event times.
>>
>> Certainly that might be unlikely, but it certainly is not impossible,
>> and you're not likely to get much more than a year's warning if it
>> were to happen (at best).   Wouldn't planning for this kind of thing
>> now be much more rational than just sticking your heads in the sand
>> with a "we didn't consider that and it is too late now" attitude.
>>
>> If the old APIs need to be deprecated, and a whole new set invented,
>> then so be it - do that - the old ones can be supported, as best they
>> can be given they are based upon false assumptions, for a long time,
>> but averything should be encouraged to convert to something rational,
>> with no in-built assumptions about what is possible or rational wrt
>> local time.
>>
>>   | - legal-focus: follow government law as to the meaning of
>>   | standard/daylight (tzdb's new choice)
>>
>> First, standard time is the time that applies *now* - whenever now is.
>> If it has a name, distinct from the name that applies to the time at
>> some other time of the year, that's fine (but almost irrelevant to
>> anything).
>>
>>   | Most Java libraries aren't going to change because doing so would
>>   | impact compatibility in APIs.The real problem here is how tricky it is
>>   | to reverse engineer the old data from the new data.
>>
>> I suspect that the real problem is that the current APIs are simply
>> inadequate to describe real world time behaviour.   Any assumptions
>> made, anywhere, about almost anything, will almost guarantee that.
>>
>> kre
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20190530/949de694/attachment-0001.html>


More information about the tz mailing list