"Timestamp": "2014-12-31T23:59:59.938Z"

"Timestamp": "2014-12-31T23:59:59.938Z"

  

hi there,

# I have a web service with input value: "2014-12-31T23:59:59.938Z"

# when insert into a table with column `Timestamp` DATETIME NOT NULL, the value becomes: 

2015-01-01 07:00:00

Can anybody help?

thank you in advance

Solution

Hi Pasar,

The behaviour is correct. The web service sends time in UTC (visible by the "Z" at the end). When receiving such a timestamp, the Platform converts it to local (server) time, which apparently is UTC +7.

Solution

I think the issue is that the millisecond part is rounded. UTC + 7 should become 2015-01-01 06:59:59.938. I think I remember reading somewhere that Outsystems does store the millisecond part in the database, but rounds it when showing the date. Maybe you can confirm this via direct access to the DB?

Lennart Kraak wrote:

I think the issue is that the millisecond part is rounded. UTC + 7 should become 2015-01-01 06:59:59.938. I think I remember reading somewhere that Outsystems does store the millisecond part in the database, but rounds it when showing the date. Maybe you can confirm this via direct access to the DB?

Correct, it is rounded in MYSQL DB..

thank you all..