[squeak-dev] Same Dates are not equal

Jörg Belger unique75 at web.de
Sun Jan 23 19:47:43 UTC 2022


For me it sounds a bit confusing, but maybe it is because of Sunday evening and my head is half in sleeping-mode :-)

I understand that „TimeStamp now“ is my German local timestamp with +1 UTC and „TimeStamp now asUTC“ is +0 UTC. Here it is currently 20:45pm and both are normally the same date, when we look from the standpoint that only day/month/year matters. But of course if I would do the same one minute after German midnight, then the dates differs by one day. So this is surely what you mean with „intentional behavior“ and you are right. The intentional behavior is to represent international dates with timezones, that is what I read now out from your answer. That means also Date >> newDay:month:year: creates more like a UTC date version.

From my standpoint and I like the things „easy“, maybe It would be easier for a programmer and also for the implementation when all chronological objects are generally internally represented in +0 UTC. Not the objects need to be changed/converted, only the display/print string of these objects should be different. As example the standard print string could be time zone dependent, so that I can see all timestamps in my local time zone.

In my project I use only UTC timestamps in objects and disk files and it seems (based on your answer) that I have forget now to send an #asUTC at some place. This would be not needed if all things would be in +0 UTC in any case.

But thanks for your answer, so I will add the #asUTC.

Do you have also an answer for me about Mantis registration/login?

> Am 23.01.2022 um 19:56 schrieb Jaromir Matas <mail at jaromir.net>:
> Hi,
> I wonder if it’s really a bug or an intentional behavior… firstDate includes the timezone offset which causes the inequality.

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

More information about the Squeak-dev mailing list