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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

ThingWorx 9.1 installed with foundation package get date issue

svisveswaraiya
17-Peridot

ThingWorx 9.1 installed with foundation package get date issue

Hi,

I have installed thingworx foundation with sql. I created a new thing (mssql template) and connected it successfully. But writing a new query (select getdate()) returns wrong date. It adds 5 hours with the current date. But when executed in sql it returns correct date but in thingworx it returns wrong date. What could be the issue? 

 

Thanks in advance,

Shalini V.

svisveswaraiya-_1-1612267777581.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @svisveswaraiya

 

As you have mentioned you installed Thingworx 9.1 with installer then you might know this particular version installer changes OS TimeZone to UTC. Here is an article for details: New TimeZone Setting in Thingworx 9.x 

 

Now even though you are running Thingworx on your local machine which has a different timezone but your result obtained will be in UTC. 

 

But if Thingworx or DB query ran on the server itself it will give correct result.

View solution in original post

7 REPLIES 7

Where have you installed your Thingworx. Is it local or on the server? If on the server, please check the Server Date Timings format. That's why it displays mismatch in the timings. If it's on the Server which is not hosted locally, go and run the date command and validate the timings and match with your local timings.

Hi @Riz-4165786 ,

Its on server and it already matches the local timing.

Is your sql DB server also on the same server? It has something to do with server timings. I can't think of anything else other than this.

Yes, the sql DB is also installed in same server and the timing is also matched to my local. But still it adds up the 5 hrs. Is there any other way to debug this?

Hello @svisveswaraiya 

 

It basically happen when your local time don't match with server Timezone as thingworx always show result based on server timezone. Can you please cross verify your server time zone one more time?

 

Thanks

Om Dukiya

Hi @svisveswaraiya

 

As you have mentioned you installed Thingworx 9.1 with installer then you might know this particular version installer changes OS TimeZone to UTC. Here is an article for details: New TimeZone Setting in Thingworx 9.x 

 

Now even though you are running Thingworx on your local machine which has a different timezone but your result obtained will be in UTC. 

 

But if Thingworx or DB query ran on the server itself it will give correct result.

Hi @svisveswaraiya.

 

If you feel your question has now been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Top Tags