[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Possible nasty bug in time management (Issue #602)

Juan Vuletich JuanVuletich at zoho.com
Fri Nov 12 15:06:25 UTC 2021

Thanks for the feedback, Dave.

That area was outdated in Cuis essentially for compatibility with older 
VMs. Time has come, though. I just pushed updates to the Cuis repo that 
use (and require) the newer primitives.


On 11/3/2021 11:41 PM, David T. Lewis wrote:
> Hi Nicola,
> Actually this is an issue that must be handled in the image.
> If you look at DateAndTime now in Squeak (any recent image)
> you can see that it uses primitiveUtcWithOffset to obtain the
> current time (UTC) and timezone offset, so Squeak is able to
> follow the daylight savings time transition correctly. Cuis is
> using a different implementation of DateAndTime based on an
> older Squeak version, and that is the source of the issue you
> are seeing.
> Dave
> On Wed, Nov 03, 2021 at 09:05:11AM -0700, Dr. Nicola Mingotti wrote:
>> Hi guys,
>> I found this bug running Cuis on my servers. I reported to the Cuis mailing list and after reply by Gerald Klix I guess this is the most appropriate place to tell it. I copy the same message i wrote on morning of 03-Nov-2021 in the hope you will be able to fix it. Unfortunately i can't help you, VM is still too much an unknown territory for me.
>> =============== Original mail to cuis mailing list descriving the problem ====================
>> I report you what i discovered this morning.
>> . I have 2 services running in Cuis in 2 independent Linux/Debian servers.
>> . In the weekend in Italy we changed time from CEST to CET
>> . The OSes changed time correctly
>> . But Cuis services are 1 hour forward !?!?
>> . If i run a fresh new Cuis now in my laptop (Linux/debian vm), I see it has the correct time, corresponding to the OS time
>> . I did not change my localTimeZone in Cuis, in any machine. It is acceptable for me it says UTC
>>    even if it is actually localtime.
>> . Seeing 'DateAndTime now' I discovered that Cuis by default uses primLocalMicrosecondClock, so it should
>>    always use the OS local clock and think it is in the UTC timezone. But, it is not doing
>>    so on images that were started some days ago (max 20). It does so on new run images.
>> I don't know well how to fix this. Maybe some time config is made when Cuis starts up?
>> It seems it is remembering the time when it was stared.
>> =============================================================================
>> -- 
>> You are receiving this because you are subscribed to this thread.
>> Reply to this email directly or view it on GitHub:
>> https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/602

Juan Vuletich

More information about the Vm-dev mailing list