Skip to main content
1-Visitor
February 2, 2021
Solved

ThingWorx 9.1 installed with foundation package get date issue

  • February 2, 2021
  • 3 replies
  • 3072 views

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

 

 

 

Best answer by suverma

Hi @svisveswaraiya_285988

 

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.

3 replies

12-Amethyst
February 2, 2021

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.

1-Visitor
February 2, 2021

Hi @Riz-4165786 ,

Its on server and it already matches the local timing.

12-Amethyst
February 2, 2021

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.

suverma14-AlexandriteAnswer
14-Alexandrite
February 11, 2021

Hi @svisveswaraiya_285988

 

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.

Support
February 26, 2021

Hi @svisveswaraiya_285745.

 

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