Skip to Main Content
AVEVA Product Feedback


Status No Status
Created by Guest
Created on Aug 20, 2022

Add IsDST() function to AF Analytics

Use Case: calculating which Shift is working within a rotating-shift cycle, which must the follow Daylight Savings Time offset. This function is available in the Performance Equation library, but not in AF. The function itself is simple once one knows it, but is not obvious (kudos to Nicola Gargano): IsDst = Floor(Float('*'-'1-jan') / 3600) Mod 24 <> Hour('*') It should be added to the AF function library. For more background, see this link: https://pisquare.osisoft.com/message/99046-re-need-isdst-function-is-daylight-savings-time-in-af#32418
  • Attach files
  • Guest
    Reply
    |
    Aug 20, 2022
    Minor update to Nicola Gargano's original idea, if you try to put this into AF and backfill it you to another year you will get incorrect numbers. I've modified the equations slightly to account for this: Floor(Float('*'-parsetime(concat("1-jan", String(year('*'))))) / 3600) Mod 24 <> Hour('*') without the "year('*')" string it will pull the current year's version of January 1st :/