[squeak-dev] About the new Date
Jon Hylands
jon at huv.com
Sat Feb 4 16:57:51 UTC 2012
On Sat, Feb 4, 2012 at 12:43 AM, David T. Lewis <lewis at mail.msen.com> wrote:
> I'm struggling to understand why "Date today" should be a TimeSpan that
> begins at some time other than midnight in my local time zone. The date
> that I think of as "4 February 2012" began about 20 minutes ago here in
> Detroit, but in London and Paris it is old news.
>
David,
The issue that I'm having is this:
When I evaluate and store this object today: (Date newDay: 1 month: 1 year:
2012), and then six months later I evaluate exactly the same expression,
because I live in a country where daylight savings is applied, those two
objects will not be equal.
I can't think of a single logical reason why it should work that way. When
I create a date (any date), it sets the timezone of the date to be whatever
current timezone I happen to be in. That makes Date completely unusable as
a historical indexing object.
- Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20120204/95d469f5/attachment.htm
More information about the Squeak-dev
mailing list
|