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

CHANGE IN DATE TIME ZONE IN CSV EXPORT

Anuphd
5-Regular Member

CHANGE IN DATE TIME ZONE IN CSV EXPORT

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.

5 REPLIES 5
PaiChung
22-Sapphire I
(To:Anuphd)

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.

Anuphd
5-Regular Member
(To:PaiChung)

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

PaiChung
22-Sapphire I
(To:Anuphd)

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.

Anuphd
5-Regular Member
(To:PaiChung)

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

atondorf
12-Amethyst
(To:Anuphd)

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 ... 

Top Tags