[squeak-dev] DateAndTime - offset just bit me

Chris Cunningham cunningham.cb at gmail.com
Tue Mar 14 21:05:46 UTC 2017


On Tue, Mar 14, 2017 at 8:29 AM, Eliot Miranda <eliot.miranda at gmail.com>
wrote:

>
>
> On Tue, Mar 14, 2017 at 8:26 AM, Chris Cunningham <cunningham.cb at gmail.com
> > wrote:
>
>> HI.
>>
>> On Tue, Mar 14, 2017 at 8:13 AM, Eliot Miranda <eliot.miranda at gmail.com>
>> wrote:
>>
>>> Hi Levente,
>>>
>>> On Tue, Mar 14, 2017 at 2:41 AM, Levente Uzonyi <leves at caesar.elte.hu>
>>> wrote:
>>>
>>>> Hi Eliot,
>>>>
>>>> I pointed out earlier that the time zone doesn't update in primitive
>>>> 241 or primitiveUtcWithOffset when DST changes happen.
>>>> However, it does change in LocalePlugin's primitiveTimezoneOffset,
>>>> which is what we use as a workaround to create correct DateAndTime
>>>> instances in one of our projects.
>>>> It would be nice if the other two primitives worked correctly.
>>>
>>>
>>> Sure, but the point is that we don't want the normal time access
>>> primitive to update the timezone in 241 because that adds overhead to every
>>> invocation that pays off only twice a year.  As David points out
>>> primitiveUtcWithOffset /does/ update the timezone.  So what's needed is a
>>> way to arrange that primitiveUtcWithOffset is invoked often enough to
>>> update the timezone, but infrequently enough not to cost a lot.
>>>
>>
>> To be precise, some places change 4 times a year (double daylight
>> savings); some never change.
>>
>
> Ah, good to know.  Can you point to examples of the former?
>

Hmm.  No, I can't.  I could have sworn it happened, but apparently I
gathered the knowledge many years ago when it had happened (recently-ish)
and there was a move to try and adopt it at various points.  That said, it
doesn't look like it is actually being used that I can find, so feel free
to ignore this for going forward.

-cbc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170314/7f163058/attachment.html>


More information about the Squeak-dev mailing list