AnsweredAssumed Answered

AF daylight savings / Server Time Question

Question asked by andrew_Inwood on Sep 30, 2020
Latest reply on Oct 8, 2020 by andrew_Inwood

I am trying to diagnose an issue with some calculations we have in Asset Framework that stopped working properly when we changed to Daylight Saving Time last weekend.

 

The calculations forecast production based on current rate, elapsed time and the time remaining in the day.  We want this to stay in "Standard Time", not daylight time.

 

We get seconds remaining in an AF calculation using 86400-DaySec('*') (and similarly use DaySec('*') for the elapsed number of seconds).  

 

The server that we run the PI AF on is set to Standard Time.  My laptop is on daylight time.  When I try to evaluate these using the AF client on my laptop, I assumed that the time calculation would calculate on the server, and return a value relative to standard time. 

 

Eg.  It is nearly 22:00 here (daylight time).  That means that there is 2 hour until midnight, but 3 hours until the end of the Standard Day.  I want the seconds remaining in the calc to be 10,800, but it is saying 7,200 (i.e. it is evaluating it relative to client time, I assume).

 

Our PI Server definitely runs on "Standard" time (I'm 99% sure the AF server does too - can I check via an attribute?)  You can see that in PI Processbook, it shows the 1-hour offset between Server Time and Laptop (local) time:

 

And here's the AF Calculation evaluation of the Sinusoid Time stamp:

 

 

1.) Is there a way to may the AF Client (i.e. PI System Explorer) display in server time, like you have the option with PI Processbook?

2.) Is there a way to confirm that the server is using Standard Time (I've asked the server admin, and he assures me that it is; but he noted that the AF SQL database is on one server, and the AF application is on another).

3.) Any suggestions on a more robust solution to get seconds remaining?  We're UTC + 12, so if I could get the UTC time and add 43,200s to it, that would be fine...

Outcomes