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

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
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
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 1, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json