Wrong devicetime?

aditya.achmad a year ago

Screenshot 2024-09-25 at 23.38.12.png

Hello,

78781f12180919130735c5008cc46c0b4b812000d0a201fe0a2ff9009dfb000b997d0d0a

With raw data above, isn't the devicetime supposed to be 2024-09-25 19:07:53?

180919130735
0x18 = 24
0x09 = 9
0x19 = 25
0x13 = 19
0x07 = 7
0x35 = 53
Anton Tananaev a year ago

You haven't provided any timezone information (device or SQL), so it's impossible to tell.

aditya.achmad a year ago

Server timezone is UTC+8, and the device is UTC.

Fyi only this 1 row has the wrong time.

Screenshot 2024-09-26 at 01.28.21.png
*sorted by servertime

Anton Tananaev a year ago

You still haven't provided details on what timezone your database is showing.

aditya.achmad a year ago

Postgres timezone is UTC+7.
But does it have an impact? Because only that 1 row has the wrong value.

Anton Tananaev a year ago

I noticed that you have milliseconds for some of the data points, which likely indicate that you had cell/wifi based locations there. For those types of locations we use server time.

aditya.achmad a year ago

I already set all timezones to UTC.

raw:
7878222218091e072f1ace0093eefd0b4bcc5022f15b01fe0a2fae0027bf01000000e4e78d0d0a

18 = 24
09 = 9
1e = 30
07 = 7
2f = 47
1a = 26

devicetime should be 2024-09-30 07:47:26

Screenshot 2024-09-30 at 14.50.45.png

Anton Tananaev a year ago

Does your device report any timezone in the login message?

aditya.achmad a year ago

Login message:
78781101035151009504083120082bc1000b79ae0d0a

and I set the device timezone by sending GMT,E,0,0#

Anton Tananaev a year ago

Yes, it does include timezone info. And it says 7 hours offset.

aditya.achmad a year ago

So i need to send GMT,E,0,0# before set the server address?

Anton Tananaev a year ago

You have to either make sure device reports UTC in login or you have to force UTC in the server settings.

aditya.achmad a year ago
<entry key='decoder.timezone'>UTC</entry>

correct?

So let's say i set GMT,E,8,0#, it will be ignored and parsed the time as UTC?

Anton Tananaev a year ago

Correct parameter. The time your device is sending should match the timezone you specify there.

aditya.achmad a year ago

So what happens when the device timezone is reset?
I don't know why, but the timezone of some of my devices has somehow reset back to the default GMT+8.