[squeak-dev] The Trunk: Chronology-Core-dtl.79.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Mon Apr 25 07:16:39 UTC 2022

Hi Dave --

I presume that we did this for backwards compatibility? How much old code do we suspect is there? I would prefer to make #utcOffset: the default in #offset: and maybe offer #offset: as #setRawOffset:?

Am 24.04.2022 19:43:02 schrieb commits at source.squeak.org <commits at source.squeak.org>:
David T. Lewis uploaded a new version of Chronology-Core to project The Trunk:

==================== Summary ====================

Name: Chronology-Core-dtl.79
Author: dtl
Time: 24 April 2022, 1:42:51.885752 pm
UUID: 6f7605b0-2d71-404a-bb89-0a18345f875a
Ancestors: Chronology-Core-mt.78

Provide a better method comment for DateAndTime>>offset: to address a long-standing #FIXME flag. We now have #utcOffset: to complement #offset: so a better explanation of the behavior is sufficient to clarify the difference.

=============== Diff against Chronology-Core-mt.78 ===============

Item was changed:
----- Method: DateAndTime>>offset: (in category 'ansi protocol') -----
offset: anOffset
+ "Answer a DateAndTime for a different time zone offset that has the same
+ year, month, day, hour, minute, and second as this instance, and with
+ printString that matches except for time zone offset."

- "Answer a equivalent to the receiver but with its local time
- being offset from UTC by offset."
| newOffset newMicros |
- self flag: #FIXME. "check the definition of this and of #utcOffset:"
newOffset := anOffset asDuration asSeconds.
newMicros := localOffsetSeconds - newOffset * 1000000 + utcMicroseconds.
^ self class utcMicroseconds: newMicros offset: newOffset

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

More information about the Squeak-dev mailing list