[squeak-dev] Status of date problem

Max Leske maxleske at gmail.com
Sat Mar 19 10:40:44 UTC 2016


> On 19 Mar 2016, at 08:49, squeak-dev-request at lists.squeakfoundation.org wrote:
> 
> I just fixed this one. By setting the time zone (localOffset) now the local time appears to jump. UTC is continuous, as it should be.
> 
> A side effect is that the clock in our tool bar now shows that adjusted local time.
> 
> To ensure the millisecondClock is continuous, it now follows UTC. 
> 
> All tests are still green so I hope it’s good.
> 
> And Max’s tests might work again, too, without manual preference fiddling.

Yes, that fixes my problem. I still needed to make a small adaptation to reset the value of #automaticTimezone to the value used before the tests but that’s no issue.

Thanks for the fix. Great response time :)

Cheers,
Max

> 
>> Do you know whether this bug affects any API besides #now?
> 
> I think the comments in DateAndTime>>offset: and utcOffset: could use updating. They both claim to return an “equivalent” but they’re not:
> 
> x := DateAndTime now.
> x = (x offset: 0)
> ==> false
> 
> x = (x utcOffset: 0)
> ==> true
> 
> Since “utcOffset:" appears to do the right thing I’d actually prefer it to the “nowAtOffset:” you just introduced. E.g. to get the current time in LA you could simply use
> 
> DateAndTime now utcOffset: -7 hours
> 
> No need for a new message. Arguably this is what “offset:” should do, and it would if the implementation was utc-based (as is David’s) rather than local-time based.
> 
> - Bert -

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160319/fc0644c3/attachment.htm


More information about the Squeak-dev mailing list