I think, you dont understand me.
Getting current date and time not reflects system time changes.
Just start pharo then change your windows system time and execute "DateAndTime now".
It will return wrong datetime.
So question:
how to reinitialize DateAndTime in such situation to get right system date and time?
Instances of DateAndTime directly store the seconds / nanoseconds for they time.
On 2012-07-13, at 08:45, Denis Kudriashov wrote:
> Hello,
>
> I try to implement system time synchronization with some server.
> And I found that when system OS time changed running pharo instance don't
> see that.
> I execute DateAndTime>>initializeOffsets but it not helps.
>
> Is it bug somewhere?
> Is it possible to reinitialize OS date and time from running pharo?
If the underlying system time changes this is not reflected in the existing instances...
If you can get somehow the offset by which the time changed you can manually loop
over all DateAndTime objects and replace the internal representations...
DateAndTime allInstances do: [ :each|
� � � � each instVarNamed: #seconds put: each seconds + systemTimeChange ].
> I use WindowsXP
>
> Best regards,
> Denis