Geolocation extension datetime returns value converted to local timezone of server.

0
0

Hi, from geolocation extension sourcecode:
long milliseconds = position.timestamp;
this.TimeStamp = new DateTime(minTicks, DateTimeKind.Utc).AddMilliseconds(milliseconds).ToLocalTime();

If server is hosted in another timezone, client js UTC timestamp is converted to a local server time,
I guess geolocation datetime in wisej must be showed as UTC
Maybe like this (without “ToLocalTime()” method):

long milliseconds = position.timestamp;
this.TimeStamp = new DateTime(minTicks, DateTimeKind.Utc).AddMilliseconds(milliseconds)

Or better solution to have 2 wisej geolocation control properties UtcDateTime and ClientDateTime based on javascript call:
new Date().getTimezoneOffset();//gets the timezone offset

Thanks in advance

  • You must to post comments
0
0

Good catch. It’s enough to remove ToLocalTime(). The client browser already returns the local time for the client.

  • You must to post comments
0
0

Thanks, we’ll change.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.