Counting time difference.

holo via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Feb 4 04:32:19 PST 2016


On Wednesday, 3 February 2016 at 22:45:03 UTC, sigod wrote:
> On Wednesday, 3 February 2016 at 22:27:07 UTC, holo wrote:
>> When i start same program on server in different timezone 
>> difference is much higher (more than hour). Why it is 
>> happening? Timezones shouldnt have influence on such equation.
>
> Try using `Clock.currTime(UTC())`. And make sure all instances 
> produce timezone independent timestamps.

Thank you, now i see that AWS is getting back Time in UTC so that 
solved problem.

@Jonathan M Davis

like i wrote above using UTC time helped me. Thank you for 
information about that monotonic clock will check it too for 
learning purpose.

//holo


More information about the Digitalmars-d-learn mailing list