TimeZone considerations when using PI OLEDB (Multiple timezones)

Discussion created by eignert on Jun 11, 2013
Latest reply on Jun 17, 2013 by Gregor



I have created an application that generates customizable reports using PI OLEDB.
This application is running on Server A (TimeZone is UTC +2h). The data that is accessed is stored on a PI server (Server B; TimeZone UTC -4h).
Server A and B are in two different TimeZones that switch to daylight saving time (and back) on different dates.


There is no problem with this configuration as I can use either server time or client time to retrieve my data.


But then there is another case for that I don't know how to handle it in the best possible way:
Data from a third timezone (UTC +9h) is stored on the PI server B.


I would now like to create a report for my application that outputs the report in the original timezone of the data.
Af far as I know there is no possibility to tell PI OLEDB what timezone to use when accessing data from a PI server.


One possibility that comes to my mind is to use UTC timestamps and calculate the correct timestamps using the time zone information from the original datasource.


Does anyone have any recommendations how to achieve this with least possible calculations to be made in the application code? (My application is written in .NET 4.0 / C#).


I'm looking forward to your suggestions,
Best regards