[squeak-dev] Should Dates be Timezone-specific?

Chris Muller ma.chris.m at gmail.com
Wed Jul 6 04:38:13 UTC 2011


If

  '3/31/2011' asDate

is executed in two different time-zones, it will produce two Dates
which are not equal (#=).

The view is that a Date is a "Timespan with duration of 1 day," and
the implementation is strict-enough to respect that that duration
occurs at different times for everyone around the world.

Date>>#< (the less-than selector) also respects the time-zone, the
time-zone which occurs further west is > the one created in the east
since it started after.

But when Dates from different TimeZones are intermixed into a
persistent object-model, it circumvents an elegant simplicity of
comparing dates.  March 31st coincides within 24 hours for all of us,
and so that's "close enough" for many applications to want to consider
the object, [March 24th, 2011], as equal to all of the other [March
24th, 2011] Dates regardless of which TimeZone they occurred in.

It is absolutely correct that DateAndTimes respect Time-Zones as they
do.  What do you think about Dates?



More information about the Squeak-dev mailing list