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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

Timestamps in Mashup PDF Extension

Ascherer17
15-Moonstone

Timestamps in Mashup PDF Extension

I'm using the PDF Extension to create a pdf of a time series chart.  I have the mashup set to query some data and display it in the Time Series Chart widget.  Everything works great except that the timestamps on the chart are 5 hours ahead of the expected timestamps. 

Looking up UTC time, my time zone is 5 hours behind UTC.  I understand that Thingworx stores timestamps as UTC and then shows them in the client's time zone context when data is queried.  It appears that the PDF extension uses UTC time since it is a headless renderer of the mashup.  

 

Anybody have an idea of how I can get the extension to show times in a specific time zone context rather than UTC?  Adding a time zone input to the CreatePDF Service of the extension seems like a good idea for cases like this.  

Of course, I could add services that process the data to change timestamps based on the time zone I want to show, but I'd like to know if anyone has some other insight.

ACCEPTED SOLUTION

Accepted Solutions
Ascherer17
15-Moonstone
(To:PaiChung)

I ended up using the TimeShift() function on the InfoTable before it goes into the Time Series Chart. In order to get the correct UTC offset, I used the dateOffset() snippet.

View solution in original post

2 REPLIES 2
PaiChung
22-Sapphire I
(To:Ascherer17)

I don't think there is any utility out there at the moment, so you will need to do the conversion unfortunately.

 

Ascherer17
15-Moonstone
(To:PaiChung)

I ended up using the TimeShift() function on the InfoTable before it goes into the Time Series Chart. In order to get the correct UTC offset, I used the dateOffset() snippet.

Announcements


Top Tags