[squeak-dev] UTCDateAndTime discussion + Q&A

Sean P. DeNigris sean at clipperadams.com
Tue Oct 23 15:17:44 UTC 2018


Chris Muller-4 wrote
>                  1) "local" e.g., a period that begins from 12am to
> 11:59:59.999999 of my LOCAL time,

Not to reignite the long and numerous debates on the topic, but IHMO the
seemingly unresolvable (in-practice) problem with appending offsets to
historical dates is the offset-changing effect of daylight savings time.
What we want to know is "the offset of my local time on the date in
question", but all we know is "the local offset today". This leads to subtle
bugs like:
"executed just before DST"
timestamp := '1/1/2016' asDate start.
"executed just after"
timestamp = '1/1/2016' asDate start "false - WTH!"

The only solution seems to be more seriously modeling timezones w.r.t. all
the dates effecting them via an external authority. This is a nasty bug and
again IMHO is probably better not to provide this kind of behavior at all
rather than provide it in a subtly wrong way.



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html


More information about the Squeak-dev mailing list