Skip to main content
1-Visitor
August 10, 2015
Question

Time Zones - Working with data in multiple time zones

  • August 10, 2015
  • 2 replies
  • 6553 views

Are there any Resources or Things in TW5 to help with time zone conversion?  I'm working with sensors that will always send data (vai rest) in UTC and so I need switch them between GMT and BST (Summer time =1hr) for part of the year?

I'm thinking of just adding the Offset between local time and UTC and I think this will work in the UK but what about if I were working on a project where the sensors are in UTC, The client was in America and the server is in the UK?  In this case would the offset would still be between UTC and the time in London (where the server is)?  What would happen when the client in america viewed the data?

2 replies

1-Visitor
August 13, 2015

Hi Allan,


I created one enhancement request for this (add offset value on UTC timestamp)
and another one to be able to add offset as parameter to all widget involved with 
time related (eg: time picker, time sereis ...).


Regards,
Franck

1-Visitor
October 16, 2015

Hi Franck,

That's not enough, this doesn't solves the TimeZone lack of functionality of ThingWorx at all, and it produces more problems than solutions.

ThingWorx should support TimeZone on Widgets, but TimeZones ( like the ones on IANA database ) not Offsets, Offsets are not the way to go.

As you know, I've already re-build the Widgets ( Grid, PropertyDisplay, DataTime Picker, TimeSelector, TimeSeries and Export ) by myself to support TimeZone in the correct way. Also on the server side one extension to work with TimeZones.

Now it's in your side to use it or not, as I've shared to you guys.

Best Regards,

Carles.

1-Visitor
May 10, 2016

Has there been any progress on incorporating time zone support into ThingWorx? Are there any extensions that support the IANA/Olson or Microsoft standard ids or can handle daylight savings conversions?

1-Visitor
August 17, 2015

There is the capability to do a timeshift (Resources["InfoTableFunctions"].TimeShift(params); ) and you define the shift value.

10-Marble
November 12, 2015

Just an update, I came across this problem also and think maybe I can share my solution here.

Keri is right, just use the timeshift function. You can just create a timeshift service with InfoTable as input. For this example, I set my Shift=-28900(- 8 hours).

Then, link the (All data) of the original service(lets say GetihRawData10) to the input(Infotable) of the timeshift service. Please take note that the datashape should be the same.

Then Drag the "ServiceCompletedCompleted" from the GetihRawData10 to the timeshift service.

Finally, drag the "All Data" from the timeshift service to a grid or chart to display the data.


You should see the timestamp values being offset by -8hours.

Hope it helps.