[BUG] DateAndTime subtraction

David T. Lewis lewis at mail.msen.com
Sun Nov 7 00:26:26 UTC 2004


On Sat, Nov 06, 2004 at 10:48:39PM +0100, Boris Gaertner wrote:
> 
> From: "David T. Lewis" <lewis at mail.msen.com>
> > When the clock on the wall in Detroit says 9:00am, the clock on the wall
> > in London says 2:00pm. The Duration difference between the corresponding
> > DateAndTime values should be zero. In Squeak, the difference is a Duration
> > of ten hours.
> 
> So the time difference is seemingly 5 hours.
> Now, compute this:
> | thisMoment thisMomentInDetroit |
> thisMoment := DateAndTime year: 2004 month: 11 day: 02 hour: 14 minute: 00.
> thisMomentInDetroit := thisMoment utcOffset: -5 hours.
>  {thisMoment . thisMomentInDetroit}
>  #(2004-11-02T14:00:00+00:00 2004-11-02T09:00:00-05:00)
> 
> Is it possible that you have a typo in your example?
> (05:00 where -05:00 should have been written?)

Yes, the sign in my example is reversed. My apologies, bug report retracted.

I *knew* I was doing something stupid, thank you for the correction.

Dave




More information about the Squeak-dev mailing list