[squeak-dev] Bug in DateAndTime fromUnixTime: ???

John-Reed Maffeo jrmaffeo at gmail.com
Sat Sep 28 05:28:38 UTC 2019


When I execute :
DateAndTime fromUnixTime: 1569648600
The value I get is :    2019-09-28T05:30:00-07:00

This looks wrong to me because UNIX time is supposed to be in UTC and the
value shows an offset of -07:00 hours which I assume is the offset for
Mountain Standard Time in the US.

My understanding is that the UTC value should be 2019-09-28T05:30:00-00:00
and I would have to convert it to 2019-09-27T10:30:00-07:00 to get the
local time.

If the method #fromUnixTime is expected to return a value with the local
timezone offset, then the time value should be adjusted to local time to
match the offset.

However, I don't think that a UNIX time value should be represented in
anything but UTC and the application should decide when and how to modify
it.

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


More information about the Squeak-dev mailing list