[squeak-dev] DateAndTimeLeapTest>>testAsSeconds is broken
bert at freudenbergs.de
Sun Dec 4 09:36:50 UTC 2016
On Sun, 4 Dec 2016 at 01:04, David T. Lewis <lewis at mail.msen.com> wrote:
> On Wed, Nov 30, 2016 at 10:51:05PM -0500, David T. Lewis wrote:
> > DateAndTimeLeapTest>>testAsSeconds is broken. The test passes
> incorrectly as a
> > result of a false assertion:
> > self assert: aDateAndTime asSeconds = 3255514380.
> > Where aDateAndTime is specified in #setUp
> > aDateAndTime := (DateAndTime year: 2004 month: 2 day: 29 hour: 13
> minute: 33 second: 0 offset: 2 hours).
> > This time is 2004-02-29T13:33:00+02:00, which in UTC is
> > The #asSeconds tests should test for elapsed seconds from the Smalltalk
> > until 2004-02-29T11:33:00+00:00. The correct number of seconds for this
> > is 3255507180, not 3255514380 as asserted in the unit test.
> > By definition, #asSeconds is the seconds elapsed since the Smalltalk
> > (see its method comment). By common agreement, the Smalltalk epoch was
> > relative to Greenwich Mean Time (UTC). If these two statements are both
> > then the test is broken.
> > If there is no disagreement, I will fix the test and allow it to show
> the failure.
> This thread has generated some interesting discussion, but my original
> question remains.
> The correct number of elapsed seconds from the Smalltalk epoch to
> 2004-02-29T13:33:00+02:00 is 3255507180. I want to change #testAsSeconds
> assert this value. The test will fail, as it should.
> Any objections?
- Bert -
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev