Skip to main content
12-Amethyst
Apr 26, 2024 9:36 AM UTC
Question

ThingWorx display different time than DB had

Hello all TWX masters.

 

I installed TWX  9.3.6-b1323 from installer  and I have strange behaviors with time.

 

I have some records in MSSQL DB with time 14:05:56 but when I execute it from TWX side I have 16:05:56...

 

I checked server time - its ok

I checked DB time - its ok

I execute TWX service like getDate() - its ok

I checked Tomcat JVM setting (-Duser.timezone=UTC) so its ok...

I have empty mind where it could be a problem...

 

Best regards,

Jan

2 replies

15-Moonstone
Apr 26, 2024 10:26 AM UTC

All datetime objects displayed in Thingworx (Composer or Runtime) are converted to your browser's time. If you want to see the "raw" time, convert the datetime object to a string and let the service display it. Another way would be to log it in the ScriptLog.

Translate
12-Amethyst
Apr 26, 2024 10:30 AM UTC

Hi,

You know it happen when I execute SQL Query from Connectors. It only happen there. I mean when I ask about DB data. 
All Date on datepickers ect works as it should.

 

I have two env on one single browser with TWX 8.4 - works perfect. With 9.3 works with 2 hours delay.

Translate