[squeak-dev] trunk thinks its tomorrow

Chris Muller asqueaker at gmail.com
Wed Feb 17 04:05:06 UTC 2016


The problem has nothing to do with timezones or offsets.  Those
haven't changed in several years.  Try printing "Date today" in a
Squeak 5.0 release image, then update it to latest trunk, and print it
again.  They don't match.

I think this is probably related to the new utcMicrosecond clock stuff.


On Tue, Feb 16, 2016 at 1:00 PM, tim Rowledge <tim at rowledge.org> wrote:
>
>> On 15-02-2016, at 7:17 PM, Chris Muller <asqueaker at gmail.com> wrote:
>>
>> Date today and DateAndTime now are reporting tomorrow's date instead
>> of today's.  Ouch!
>>
>> DateAndTime now   " 2016-02-16T03:16:25.421108-06:00"
>>
>> That's my timezone offset.  But its still Monday, the 15th, not the 16th..
>>
> Hmph. Checking on my Pi I get a completely wrong TZ because my preference ‘useLocale’ is false. The code in Locale>startUp: dates back to 2005/8 so it’s unlikely to be wrong without having been noticed.
>
> Hmm, even weirder - it’s not a preference I screwed up so far as I can tell since it is the same in a plain 5.0 image on my iMac. Which makes me wonder why the menubar time is correct…
>
> Oh yuck. DateAndTime>now uses nowWithOffset: and the (wrong) offset. The ClockMorph uses Time>now which works from millisecondsSinceMidnight and uses the old prim 135 millisecond clock in an original 5.0 image and localMicrosecondClock in a recent update. So the TZ is getting added at the primitive level and we have confusion. Is it really a good idea to have a primitive using the OS idea of TZ as well as image code using its own idea of TZ?
>
> The net effect with latest updates installed is -
> DateAndTime now 2016-02-16T18:56:54.67808+01:00
> Time now 10:56:51.64374 am
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Do files get embarrassed when they get unzipped?
>
>
>


More information about the Squeak-dev mailing list