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.
Solved! Go to Solution.
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.
I don't think there is any utility out there at the moment, so you will need to do the conversion unfortunately.
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.