On 15-02-2016, at 7:17 PM, Chris Muller asqueaker@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@rowledge.org; http://www.rowledge.org/tim Do files get embarrassed when they get unzipped?