<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi,</p>
<p class="MsoNormal">I wonder if it’s really a bug or an intentional behavior… firstDate includes the timezone offset which causes the inequality.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This works ok though:</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">| timestamp firstDate secondDate |</p>
<p class="MsoNormal">        timestamp := TimeStamp now.</p>
<p class="MsoNormal">        firstDate := timestamp asUTC asDate.</p>
<p class="MsoNormal">        secondDate := Date newDay: firstDate day month: firstDate monthIndex year: firstDate year.</p>
<p class="MsoNormal">        firstDate = secondDate</p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:unique75@web.de">Jörg Belger</a><br>
<b>Sent: </b>Sunday, January 23, 2022 19:35<br>
<b>To: </b><a href="mailto:squeak-dev@lists.squeakfoundation.org">squeak-dev@lists.squeakfoundation.org</a><br>
<b>Subject: </b>[squeak-dev] Same Dates are not equal</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hello,<br>
<br>
I found the following bug in Squeak, the two Dates should be normally the same, but the comparison gives <false>.
<br>
<br>
        | timestamp firstDate secondDate |<br>
        timestamp := TimeStamp now.<br>
        firstDate := timestamp asDate.<br>
        secondDate := Date newDay: firstDate day month: firstDate monthIndex year: firstDate year.<br>
        firstDate = secondDate<br>
<br>
This happens because the <start> timestamp is not equal and differs in nanosecond value.<br>
<br>
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.<br>
<br>
Regards<br>
Jörg<br>
<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>