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.
Solved! Go to Solution.
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.
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.
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
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