[squeak-dev] About the new Date

David T. Lewis lewis at mail.msen.com
Sat Feb 4 18:48:58 UTC 2012

On Sat, Feb 04, 2012 at 11:57:51AM -0500, Jon Hylands wrote:
> 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.

Agreed. This is broken. DateAndTime is broken in exactly the same way.

> 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.

Agreed. The "timezone" object is a trivial implementation that does not
work when applied to periods of time like this.


More information about the Squeak-dev mailing list