<div dir="ltr"><div>This is a better fix than mine.</div><div>Passes tests.</div><div>My code works with this (and without my other change - i.e., reverted my alterations).</div><div><br></div><div>+1<br></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Tue, May 14, 2019 at 8:43 PM Chris Muller <<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">Dave had a #FIXME marker in #utcOffset:, it's the one that was deviant<br>
from the prior behavior.  #asLocal is good.<br>
<br>
Also included fix to move Duration creating convenience methods to<br>
this package with a pair of microSeconds accessors included.  (woops,<br>
I just saw I forgot to truncate).<br>
<br>
<br>
<br>
On Tue, May 14, 2019 at 10:33 PM <<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>> wrote:<br>
><br>
> Chris Muller uploaded a new version of Chronology-Core to project The Inbox:<br>
> <a href="http://source.squeak.org/inbox/Chronology-Core-cmm.45.mcz" target="_blank" rel="noreferrer">http://source.squeak.org/inbox/Chronology-Core-cmm.45.mcz</a><br>
><br>
> ==================== Summary ====================<br>
><br>
> Name: Chronology-Core-cmm.45<br>
> Author: cmm<br>
> Time: 14 May 2019, 10:33:41.936949 pm<br>
> UUID: 6355a6a7-febb-4ac8-a024-bf13bd00b8dc<br>
> Ancestors: Chronology-Core-nice.44<br>
><br>
> - Make #utcOffset: match the prior behavior.<br>
> - Move Duration convenience constructors in Number to this package.<br>
><br>
> =============== Diff against Chronology-Core-nice.44 ===============<br>
><br>
> Item was changed:<br>
>   ----- Method: DateAndTime>>utcOffset: (in category 'squeak protocol') -----<br>
> + utcOffset: anOffset<br>
> +       "Answer a DateAndTime equivalent to the receiver but offset from UTC by anOffset"<br>
> +       ^ self class<br>
> +               utcMicroseconds: utcMicroseconds<br>
> +               offset: anOffset asDuration asSeconds!<br>
> - utcOffset: anOffset<br>
> -<br>
> -       "Answer a <DateAndTime> equivalent to the receiver but offset from UTC by anOffset"<br>
> -<br>
> -       self flag: #FIXME. "check the definition of this and of #offset:"<br>
> -       ^self utcMicroseconds: utcMicroseconds offset: anOffset asDuration asSeconds<br>
> - !<br>
><br>
> Item was added:<br>
> + ----- Method: Number>>microSecond (in category '*chronology-core') -----<br>
> + microSecond<br>
> +       ^ self sign microSeconds!<br>
><br>
> Item was added:<br>
> + ----- Method: Number>>microSeconds (in category '*chronology-core') -----<br>
> + microSeconds<br>
> +       ^ Duration nanoSeconds: self * 1000!<br>
><br>
> Item was added:<br>
> + ----- Method: Number>>milliSecond (in category '*chronology-core') -----<br>
> + milliSecond<br>
> +<br>
> +       ^ self sign milliSeconds<br>
> + !<br>
><br>
> Item was added:<br>
> + ----- Method: Number>>milliSeconds (in category '*chronology-core') -----<br>
> + milliSeconds<br>
> +<br>
> +       ^ Duration milliSeconds: self<br>
> + !<br>
><br>
> Item was added:<br>
> + ----- Method: Number>>nanoSecond (in category '*chronology-core') -----<br>
> + nanoSecond<br>
> +<br>
> +       ^ self sign nanoSeconds<br>
> + !<br>
><br>
> Item was added:<br>
> + ----- Method: Number>>nanoSeconds (in category '*chronology-core') -----<br>
> + nanoSeconds<br>
> +<br>
> +       ^ Duration nanoSeconds: self.!<br>
><br>
> Item was added:<br>
> + ----- Method: Number>>second (in category '*chronology-core') -----<br>
> + second<br>
> +<br>
> +       ^ self sign seconds<br>
> + !<br>
><br>
> Item was added:<br>
> + ----- Method: Number>>seconds (in category '*chronology-core') -----<br>
> + seconds<br>
> +<br>
> +       ^ Duration seconds: self!<br>
><br>
><br>
<br>
</blockquote></div>