Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
I am facing a problem in the Export file . Where the CSV export file generated from the Query property history service using Export Widget gives DATE TIME in UTC , which is 5:30 Hours behind IST.
When visualized in Mashup by using grid, the DATE & TIME is in IST .
Please find the screenshots for reference.
All date time is recorded in Thingworx in UTC and then browser side it is converted.
If you need to shift your export time stamp before exporting, you will need to use a service to shift the data according to your time zone.
Hello PaiChung ,
Can you also please help me with the service or the steps I need to execute for shifting the time.
Thanks,
Anup D
You will need to know the time shift, either pre-defined or as a parameter.
After that you can retrieve the raw data and use DeriveFields (from Infotable functions) and the Date Time Functions (in Snippets) to shift the timestamp.
This would be the most efficient, but it will require a bit of a 'hack' (separate wrapping service that only needs the timestamp and has hardcoded time shift or based of a property) because you can't feed two parameters to a function called within DeriveFields
The brute force way otherwise would be to loop through the records.
Hello Pai Chung,
Thanks for helping me out. Can you do me a favour providing a screen shot of all the steps to be executed. It is still not clear from where these steps are to be executed. (From Infotable generation > modification of service> Time shift by +5.30 >Modified Infotable binding to Export widget)
Thanks,
Anup D
With the new requirement of JVM-Timezone Article - CS331340 - [Important] New Required Timezone setting in ThingWorx 9.x (ptc.com)
Thingworx does not even know it's own timezone ... so you will have to do this with some Java-Extension and a Property storing the timezone of the Server.
There are some basic Timezone services in the BuildingBlock "PTC.Base.TimeZoneHelper_TS" or have a look at the attached java source ...