[squeak-dev] Status of date problem

David T. Lewis lewis at mail.msen.com
Fri Mar 18 22:07:47 UTC 2016


On Fri, Mar 18, 2016 at 09:01:34AM -0700, Eliot Miranda wrote:
> 
> > On Mar 18, 2016, at 8:53 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
> > 
> >> On 18.03.2016, at 16:46, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> >> 
> >>> On Mar 18, 2016, at 8:32 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
> >>> 
> >>> Or even better: setting the timezone should modify local time, not UTC. I guess that???s one of the motivations for Dave???s re-implementation.
> >> 
> >> ?!?! UTC should /never/ be changeable.  One can alter one's conputer's clock to simulate computing in a different age, but UTC is supposed to be UTC and is entirely independent of time zone.
> > 
> > Agreed. But right now DateAndTime still stores local time:
> > 
> > | a b |
> > DateAndTime automaticTimezone: true.
> > a := DateAndTime now asUTC.
> > DateAndTime automaticTimezone: false.
> > DateAndTime localOffset: 5 hours.
> > b := DateAndTime now asUTC.
> > {a. b}
> > ==> {2016-03-18T15:50:21.731797+00:00 . 2016-03-18T11:50:21.731797001+00:00}
> > 
> > Which makes no sense. We should fix that, and I???m pretty sure it is fixed in David???s version. 
> 
> Phew :-)
> 

Sure, that one is fixed. But the more important point is to be able
to see and understand problems like this more easily by looking at the
DateAndTime instances directly in an inspector, see attached.

I was inspired by my earlier experiences (long ago now) trying to make
sense of Olson time zone tables in Squeak. Trying to figure out what was
supposed to be local time versus UTC, and which features were actually
bugs, was enough to make my head spin. I eventually came to the conclusion
that my own stupidity was only a part of the problem, and that there was
no real need for for things to be quite as confusing as they seemed to be.

Dave

-------------- next part --------------
A non-text attachment was scrubbed...
Name: DateAndTimeInExplorer.png
Type: image/png
Size: 20997 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160318/ad68c22b/DateAndTimeInExplorer.png


More information about the Squeak-dev mailing list