[squeak-dev] Fixing time (was: Epoch returns local offset)

Bert Freudenberg bert at freudenbergs.de
Fri May 18 19:39:18 UTC 2012


On 18.05.2012, at 21:12, Chris Muller wrote:

> I see useLocale, and it's false in standard Squeak 4.3.  Not sure how
> but when I look at DateAndTime's 'LocalTimeZone' class var, it's as if
> your fixed startup method ran because it says 'Local Time' and has the
> correct offset.

You accidentally live in the same timezone as the guy who ran that code last before releasing an image.

>> So, at the very least, anyone who needs correct UTC times must enable #useLocale. Better yet, we should switch to a more robust setup.
> 
> Well Chronology is robust, and it appears just flipping a default
> setting would "fix" it anyway..?


It's not robust in that the timezone offset is only read on startup. If you have the image running for extended periods you may miss DST changes.

That's what the new time primitive is for, which answers both current UTC time and current timezone offset.

Of course, when we fix that we will have to look out for clients that mistakenly expect local time to be monotonous.

- Bert -



More information about the Squeak-dev mailing list