[squeak-dev] Same Dates are not equal

Jaromir Matas mail at jaromir.net
Sun Jan 23 18:56:10 UTC 2022


Hi,
I wonder if it’s really a bug or an intentional behavior… firstDate includes the timezone offset which causes the inequality.

This works ok though:

| timestamp firstDate secondDate |
        timestamp := TimeStamp now.
        firstDate := timestamp asUTC asDate.
        secondDate := Date newDay: firstDate day month: firstDate monthIndex year: firstDate year.
        firstDate = secondDate

From: Jörg Belger<mailto:unique75 at web.de>
Sent: Sunday, January 23, 2022 19:35
To: squeak-dev at lists.squeakfoundation.org<mailto:squeak-dev at lists.squeakfoundation.org>
Subject: [squeak-dev] Same Dates are not equal

Hello,

I found the following bug in Squeak, the two Dates should be normally the same, but the comparison gives <false>.

        | timestamp firstDate secondDate |
        timestamp := TimeStamp now.
        firstDate := timestamp asDate.
        secondDate := Date newDay: firstDate day month: firstDate monthIndex year: firstDate year.
        firstDate = secondDate

This happens because the <start> timestamp is not equal and differs in nanosecond value.

I wanted to make a bug request in Mantis, but I did not found a registration link, I tried also to use the normal Login form and checked the „Save Login“, because I thought it will then use it as new registration, but it does not. I was already registered on the Squeak dev mailing list some weeks ago, but I deleted my subscription, because I do not want to get always emails from other things, that are not interesting for me. The chat is also not really useful, when always the same people post things about their effort in their projects. So I think I will delete my subscription again until I got an answer to this email here. It would be helpful if somebody can tell me how I can add a login for Mantis, so that I can make bug request there. If I have more experience with Squeak maybe I will also have a look on other issues in Mantis. But currently for me it is only disturbing to get so much other things, so the mailing lists and chat is currently nothing for me.

Regards
Jörg



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220123/b44716fc/attachment.html>


More information about the Squeak-dev mailing list