Hi, I have the following generated scripts:
(function(){
abp.clock.provider = abp.timing.utcClockProvider || abp.timing.localClockProvider;
abp.clock.provider.supportsMultipleTimezone = true;
abp.timing.timeZoneInfo = { windows: { timeZoneId: 'Azerbaijan Standard Time', baseUtcOffsetInMilliseconds: '14400000', currentUtcOffsetInMilliseconds: '14400000', isDaylightSavingTimeNow: 'False' }, iana: { timeZoneId:'Asia/Baku' }, }
})();
When I type abp.clock.now() it gives something like: Wed Mar 22 2017 03:00:24 GMT+0200 (GTB Standard Time)
But as you see above, I set myself for a timezone that is +4 GMT.
How come abp.clock.now() gives GMT+2?
5 Answer(s)
-
0
-
0
Hi,
Both values are same actually. When you write abp.clock.now() browser displays it's value in it's own way.
So if you use moment to display value of abp.clock.now() using moment in the browser console, I think values will be represented same.
Alkso, you can try abp.clock.now() in other browser consoles and see the difference.
-
0
Thanks. It makes sense now.
Since the timezone is +4, this explains the "+4" at the end of the moment date. Had the timezone be UTC, then the moment date displayed would be shown in UTC.
I dunno why this confuses me again, thanks for the explanation. Now I am fine.
-
0
Hi,
DateTime and TimeZone is a bit complex area I think, this happens me all the time :)
-
0
Thanks for making things easy on me :)