Hi,
i just got response from one of my app-testers that sometimes the sync doesn´t work. After some investigation i see that the app thinks that the changes inside the app are older than on the server. I use a kind of timestamp based on utc to find out wich version is the current.
In the app i use
and on my sql-server
When i start the app in the emulator the timestamps are equal, but on my phone i have a gap of exact 1 hour.
The sql server is like the simulator in UTC, my phone in CEST = UTC+2. When i last checked the app says 71868408 but the server 71872021 (higher...)
I have absolutely no idea why there is a difference. Can anybody help me?
Regards
Matze
i just got response from one of my app-testers that sometimes the sync doesn´t work. After some investigation i see that the app thinks that the changes inside the app are older than on the server. I use a kind of timestamp based on utc to find out wich version is the current.
In the app i use
B4X:
Sub timestamp() As Int
Dim r As ResultSet=sql1.ExecQuery("Select (strftime('%s','now','utc') - strftime('%s','2020-01-01 00:00:00', 'utc')) as x")
r.NextRow
Dim retstr As String=r.GetString("x")
r.close
Return retstr
End Sub
SQL:
select datediff(second,'01.01.2020',GETUTCDATE())
When i start the app in the emulator the timestamps are equal, but on my phone i have a gap of exact 1 hour.
The sql server is like the simulator in UTC, my phone in CEST = UTC+2. When i last checked the app says 71868408 but the server 71872021 (higher...)
I have absolutely no idea why there is a difference. Can anybody help me?
Regards
Matze