[squeak-dev] About the new Date
David T. Lewis
lewis at mail.msen.com
Fri Feb 10 17:13:00 UTC 2012
On Fri, Feb 10, 2012 at 08:22:34AM +0200, Brent Pinkney wrote:
> Hi,
>
> One thing we can consider is a DynamicBinding that specifies the offset. If no binding, then use the global default.
>
> This is how lisp/scheme would solve it.
Hi Brent,
That might be a good approach. I did something like that with the
TimeZoneDatabase tables, such that the current time zone is a proxy
that points to the Olsen time zone tables, and "DateAndTime
localTimeZone offset" finds the proper offset in the tables. This
works well.
Having said that, I think that Chris' original idea was to use only
the UTC-based (#globalize) style, and to rely on idioms like
"DateAndTime now asDate" to create an instance of Date with an
offset for local time zone. Having played around with the inbox changes
a bit now, I have to say that I think Chris was right, it's is probably
better to keep things simple and consistent, and not try to have a
#localize variant.
Do you (Brent) have a preference on this? For myself, I'm happy
with Chris' proposal (minus the #localize feature, which I suspect
that Chris will be more than happy to remove ;)
Dave
More information about the Squeak-dev
mailing list
|