<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 25, 2016 at 10:08 AM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><span class="">On 25.03.2016, at 17:47, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt; wrote:<br></span><div><blockquote type="cite"><br><div><div dir="ltr"><span class="">On Fri, Mar 25, 2016 at 9:23 AM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt;</span> wrote:</span><span class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Well, it’s okay to cheat as long as you won’t get caught (says DI).<br>
<br>
Simply “once a second” is not good enough if we check the time 0.5 seconds after DST switch.<br>
<br>
If “once a second” was implemented as “once every wall-clock second”, IMHO that would be fine. So the test would have to be something like<br>
<br>
        (prevUsecs // 1000000) ~= (nowUsecs // 1000000) ifTrue: [self updateOffsetFromUTC]<br>
<br>
Right?<br></blockquote><div><br></div><div>Excellent point.  So the drift algorithm to provide an accurate clock can be extended to check the time zone whenever the new time is at a different second to the previous value.</div></div></div></span></div></div></blockquote><br>Drifting makes this way more complicated I’d think … unless there is an OS function to convert the drifted UTC time into local? IF the VM time and system time differ, you can’t just ask the OS for the “now” local time.</div></div></blockquote><div><br></div><div>I wrote up the algorithm I propose; see <a href="http://forum.world.st/Time-millisecondClockValue-was-The-Trunk-Morphic-mt-1080-mcz-tt4877661.html#a4877918">http://forum.world.st/Time-millisecondClockValue-was-The-Trunk-Morphic-mt-1080-mcz-tt4877661.html#a4877918</a></div><div><br></div><div>It&#39;s not that complicated and extending it is straight-forward, given that the algorithm already maintains the last time computed.  When I&#39;ve time I&#39;ll post a revision.</div></div><br><div class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div>
</div></div>