Maximo List Archive

This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.



Daylight Savings Time (DST) and Date Adjustements Made By Actions

From: in2data (2012-02-22 16:58)

Hi,
Just a heads up on an issue I ran into this past week.
We have two fields we added to the WO table that tell the users the earliest and latest dates they can complete a PM WO and it meet the on-time criteria for our KPI. I put in place an escalation and action to copy the target completion date to the scheduled finish date field. Then I added escalations to find the PM WOs and add the values for the earliest and latest dates based on the scheduled finish date.
So for a PM WO that has a job plan that is done > 28 days and < 180 days we want the earliest date to be schedfinish - 7 days and the latest date to be schedfinish + 7 days. So I have one action where the value is :schedfinish-7 and another :schedfinish+7.
The issue occurs when a WO has a schedfinish time with an hour value of 23 or 0. This is from 11 PM until < 1 AM. If the WO schedfinish date is within 7 days of the change to DST then the system will adjust the +/-7 to take into account the change in DST.
This year DST begins on March 11. If I have a WO with a schedfinish date of 2012-03-15 00:19:59.000 that date is after the change to DST. But the earliest date is -7 dyas and that means the earliest date should be 2012-03-08 00:19:59.000. But since DST adjusted the time +1 hour ahead for any time after 3/11 the system takes this into account and adjusts the calculation for dates before 3/11 by -1 hour. So it actually takes the schedfinish date – 7 days and 1 hour. Since the hour value is 0 it now makes the earliest date 2012-03-07 23:19:59.000 not 2012-03-08 00:19:59.000.
When DST ends this year on 11/4 then the issue occurs for schedfinish dates before the change that have an hour value of 23 and the latest date is after the DST end. Then it adds =7 dyas and 1 hour.
To get around this issue I added an escalation to find any WO that has a schedfinish date hour value of 23 or 0 (DatePart(hh,schedfinish) = 23 or DatePart(hh,schedfinish) = 0) and added two hours to the date. This forces it to an hour value not = 23 or 0. The small date change is okay for us.
So any time you are going to add an action to adjust dates you have to consider the adjustments the system makes for DST.
Dave Bone


From: phanish bharadwaj (2012-02-22 21:44)

Good Piece of Info. Thanks Dave.
--- On Wed, 2/22/12, in2data <in2data@yahoo.com> wrote:
From: in2data <in2data@yahoo.com>
Subject: [MAXIMO List] Daylight Savings Time (DST) and Date Adjustements Made By Actions
To: MAXIMO@yahoogroups.com
Date: Wednesday, February 22, 2012, 10:58 AM
 
Hi,
Just a heads up on an issue I ran into this past week.
We have two fields we added to the WO table that tell the users the earliest and latest dates they can complete a PM WO and it meet the on-time criteria for our KPI. I put in place an escalation and action to copy the target completion date to the scheduled finish date field. Then I added escalations to find the PM WOs and add the values for the earliest and latest dates based on the scheduled finish date.
So for a PM WO that has a job plan that is done > 28 days and < 180 days we want the earliest date to be schedfinish - 7 days and the latest date to be schedfinish + 7 days. So I have one action where the value is :schedfinish-7 and another :schedfinish+7.
The issue occurs when a WO has a schedfinish time with an hour value of 23 or 0. This is from 11 PM until < 1 AM. If the WO schedfinish date is within 7 days of the change to DST then the system will adjust the +/-7 to take into account the change in DST.
This year DST begins on March 11. If I have a WO with a schedfinish date of 2012-03-15 00:19:59.000 that date is after the change to DST. But the earliest date is -7 dyas and that means the earliest date should be 2012-03-08 00:19:59.000. But since DST adjusted the time +1 hour ahead for any time after 3/11 the system takes this into account and adjusts the calculation for dates before 3/11 by -1 hour. So it actually takes the schedfinish date – 7 days and 1 hour. Since the hour value is 0 it now makes the earliest date 2012-03-07 23:19:59.000 not 2012-03-08 00:19:59.000.
When DST ends this year on 11/4 then the issue occurs for schedfinish dates before the change that have an hour value of 23 and the latest date is after the DST end. Then it adds =7 dyas and 1 hour.
To get around this issue I added an escalation to find any WO that has a schedfinish date hour value of 23 or 0 (DatePart(hh,schedfinish) = 23 or DatePart(hh,schedfinish) = 0) and added two hours to the date. This forces it to an hour value not = 23 or 0. The small date change is okay for us.
So any time you are going to add an action to adjust dates you have to consider the adjustments the system makes for DST.
Dave Bone