cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Times in Thingworx do not match

laue
7-Bedrock

Times in Thingworx do not match

Hello,

 

I am using Thingworx 8.4 with Postgres database, Analytics extension and Kepserverex. Thingworx and Kepserverex servers are configured to Timezone CET.

In the following examples the current time is ~1210(German Standard CET):

 

(1) I execute the queryPropertyHistory service with a Thing receiving data(current) from Kepserver, with the following results:

 

grafik.png

 

The time is exactly 3h off.

 

(2) Now I execute the following code as a service of the same thing:

var dateValue = new Date();
var formattedDate = dateFormat(dateValue,'yyyy-MM-dd hh:mm zzz');
var result = formattedDate; //resulttype string

 

Result: grafik.png

The Time is UTC so 1h off.

 

(3) Now I execute this code as service:

result = new Date(); //result datatype: DATETIME

 

The time is 2h off.

 

 

When I try to display the data in a Time Series chart in a mashup using QueryPropertyHistory, the time is 1h off.

The first (1) example changes the difference of time sometimes.

Also: I checked with different things, but got the same result.

 

What is the reason for this?

 

Thanks

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
raluca_edu
17-Peridot
(To:laue)

Hi,

 

Check this article: https://www.ptc.com/en/support/article?n=CS315667

You need to update joda java library.

 

Thank you,

Raluca Edu

View solution in original post

1 REPLY 1
raluca_edu
17-Peridot
(To:laue)

Hi,

 

Check this article: https://www.ptc.com/en/support/article?n=CS315667

You need to update joda java library.

 

Thank you,

Raluca Edu

Top Tags