Timestamp from app gets modified when reaching Codeless

Goodmorning Backendless,

I am experiencing a strange phenomena with sending timestamps to Codeless from my app.
I want to see the time difference and calculate with it, but it seems that the timestamp gets modified in Codeless for some reason and offsets it with ~30 seconds.

Below is my code to send the timestamp from the app:

Codeless class:

Logfile response:
2021-02-17 08:37:51,307 | DateSync | INFO | E3F3CAD3-3497-82B1-FF6A-E133A3CA6B00 - 1613551108096 vs 1613551071307 = -36789

As you can see Codeless uses timstamp 1613551108096 instead of 1613551069792.
I don’t know why this happen, can you help me out?

Best regards,
Robin

Hi @Robin_van_Kuijk

We are unable to reproduce your issue. I tried with your app and my own, the timestamps are equal. Are you sure that log message corresponds to your call?

The strange thing is, timestamp 1613551108096 converts to 08:38:28 (GMT+0) meanwhile the log message time is 08:37:51.

I would suggest you to create minimal reproducible example, e.g. make sample codeless method that will only receive and log the date argument. And if the problem persists, share this example with us.

Best Regards,
Maksym

Hi @Maksym_Khobotin2, strange right.
That is the problem that occurs somehow, it has a ~37 seconds time gap somehow.
I can see the timestamp generated on my debug window of Android Studio,
so that is the timestamp which has been sent, but when I check the log it thinks it something else.
Weird stuff happening, I can do multiple runs and see if the gap stays around 37 seconds,
as long as it is predictable it is ok for me, but still strange stuff.

Thanks,
Robin

I really suggest to create a new codeless method and send any raw timestamp value (without any additional logic). This will help to debug and detect the problem.