Quantcast
Channel: OSIsoft Users Community
Viewing all articles
Browse latest Browse all 1120

Time Zone issues with PIValues

$
0
0

Hi all,

 

I am doing some work with the PI SDK in Excel VBA.  I have successfully returned a PIValues collection, filtered with my parameters.  I now want to get some TimeStamp information from each PIValue in the collection.  To do this I am using .TimeStamp.LocalDate, which puts the Timestamp in the format I want it, but it changes the actual time to my computer's time zone, versus the time zone of the PI server.  In my specific case, I am in Central Time (US) and the PI Server is in Eastern Time (US), giving me a 1 hour error.

 

I can take each of these results and add the hour back in, but is there a way to get the time as it is on the PI Server?  I will be using this for other servers which are in different time zones and I don't want to have to track time zone differences as another variable.  When I use DataLink and ProcessBook I see the time zone from the server, it is just in this instance that I get my time zone.  Is there a setting in the SDK or within my code that I need to include?

 

I am using PI-DataLink 2010 v4.2.0 and for the SDK I am seeing 1.3.8.387.  Windows 7 and Office/Excel 2010 if that matters.


Viewing all articles
Browse latest Browse all 1120

Trending Articles