<br><div class="gmail_quote"><div dir="ltr">On Sun, 4 Dec 2016 at 01:04, David T. Lewis <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Nov 30, 2016 at 10:51:05PM -0500, David T. Lewis wrote:<br class="gmail_msg">
> DateAndTimeLeapTest>>testAsSeconds is broken. The test passes incorrectly as a<br class="gmail_msg">
> result of a false assertion:<br class="gmail_msg">
><br class="gmail_msg">
>       self assert: aDateAndTime asSeconds = 3255514380.<br class="gmail_msg">
><br class="gmail_msg">
> Where aDateAndTime is specified in #setUp<br class="gmail_msg">
><br class="gmail_msg">
>       aDateAndTime := (DateAndTime year: 2004 month: 2 day: 29 hour: 13 minute: 33 second: 0 offset: 2 hours).<br class="gmail_msg">
><br class="gmail_msg">
> This time is 2004-02-29T13:33:00+02:00, which in UTC is 2004-02-29T11:33:00+00:00.<br class="gmail_msg">
><br class="gmail_msg">
> The #asSeconds tests should test for elapsed seconds from the Smalltalk epoch<br class="gmail_msg">
> until 2004-02-29T11:33:00+00:00. The correct number of seconds for this duration<br class="gmail_msg">
> is 3255507180, not 3255514380 as asserted in the unit test.<br class="gmail_msg">
><br class="gmail_msg">
> By definition, #asSeconds is the seconds elapsed since the Smalltalk epoch<br class="gmail_msg">
> (see its method comment). By common agreement, the Smalltalk epoch was defined<br class="gmail_msg">
> relative to Greenwich Mean Time (UTC). If these two statements are both true,<br class="gmail_msg">
> then the test is broken.<br class="gmail_msg">
><br class="gmail_msg">
> If there is no disagreement, I will fix the test and allow it to show the failure.<br class="gmail_msg">
<br class="gmail_msg">
This thread has generated some interesting discussion, but my original<br class="gmail_msg">
question remains.<br class="gmail_msg">
<br class="gmail_msg">
The correct number of elapsed seconds from the Smalltalk epoch to<br class="gmail_msg">
2004-02-29T13:33:00+02:00 is 3255507180. I want to change #testAsSeconds<br class="gmail_msg">
assert this value. The test will fail, as it should.<br class="gmail_msg">
<br class="gmail_msg">
Any objections?<br class="gmail_msg">
<br class="gmail_msg">
Dave<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div><div style="white-space:pre-wrap"><br><br>No.<br><br>- Bert -</div>