Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
16,795

What is Daylight Time Saving (or Is it Daylight Time Shifting)?

 

 

It was not until November 18, 1883, that the US and Canada adopted a standard time. Previously, time keeping was a "local" matter. It is believed by some that Benjamin Franklin conceived the idea of Daylight Saving Time. The objective of this idea, of Daylight Time Saving or shifting the clock in Spring and Fall, appears to have been to capture most sunlit hours during a typical day work schedule. Also, an early goal of DST was to reduce evening usage of incandescent lighting, which was a primary contributor of electricity consumption. However, this is now debatable as energy usage patterns have changed significantly since then.

 

Daylight Time Saving was first adopted by Germany and Austria, in 1916, and subsequently was adopted by many countries. The USA formally adopted the plan in 1918.

 

Daylight savings and clock adjustment:

There is also a fair amount of history behind the decision to choose the day when the clock is to be shifted. If you are interested, you are referred to the various resources listed at the end of this article.

 

Currently adjustment of the clock is implemented on the following different days, as below:

 

                         
 

Adjustment of Clock for Daylight   Savings in a year

 
 

When

 
 

Shift   clock?

 
 

Daylight   Saving

 
 

Comment

 
 

2nd Sunday of March at 2am

 
 

Forward by 1hr

 
 

Daylight Saving Starts

 
 

Spring forward in Spring

 
 

1st Sunday of November at 2am

 
 

Backward by 1hr

 
 

Daylight Saving Ends

 
 

Fall Back in Fall

 

 

Hence, for example, in 2009:

  • On March 8th, at 2am, the clock was moved forward by 1hr to 3am.
  • On Nov 1st, at 2am, the clock was moved back by 1hr to 1am.
 

 

What is "Double hour"?

 

At the end of the Daylight Savings period, at 2am on the 1st Sunday of November, you are required to move your clock backwards-from 2am to 1am. This means that the clock will move twice, in the same day, from 1am to 2am. Double hour refers to the duration of the hour that the clocks traverse twice-from 1am to 2am. 

 

Why should we care about Daylight Saving in SAP environment?

Almost all the software that deal with local time will be confused and disoriented when the computer clock traverses twice through the same points in time (as previously explained in "Double Hour" scenario). SAP software, as well, is no exception and is also very sensitive to this time issue. It expects time to continue in a progressive and continuous manner.  If this issue is not handled, it can create problems in the planned batch jobs. The SAP Kernel, which is written in C/C++, uses C-runtime library functions and can easily get confused between standard time and local time. You may also see errors reported in SAP system log or status line or in ABAP dumps as "ZDATE_LARGE_TIME_DIFF", "ZDATE_ILLEGAL_LOCTIME", "ZDATE_ILLEGAL_DBTIME"

 

How to deal with the "double hour"?

There are at least three ways in which the double hour problem can be dealt with. The method that you adopt will depend on your specific environment's time zone settings as well as your tolerance for system downtime.

 

1)      Two hour downtime method: Completely avoid running SAP system during this double hour.

2)      One hour downtime method:  Let SAP system run through the double hour once. Then shutdown SAP so that it avoids going through the double hour again.

3)      Zero downtime method: Slow down the time in the SAP System.

 

Now let us examine each method.

 

 

Method-1) Two hour downtime

 

The first method is simple and straight forward. Simply shutdown the SAP system, for the entire duration of the double hour, and bring it up only after the double hour has passed. Thus, the SAP Kernel software does not have to deal with any possible mismatch of standard time and local time. For example, in the USA, this means:

1)      Shutdown SAP at 1am. (of course you should start shutting down a little earlier as taking down the system takes a few minutes)

2)      Keep SAP system down for the next two hours

3)      At 2am, your clock is changed from 2am to 1am for daylight saving time change

4)      Wait for an hour until 2am is reached

5)      Bring up SAP at 2am when the clock reaches this time again

 

Disadvantages:

You need to keep the system down for 2 hours.

 

 

Method-2) One hour downtime

 

The second method is pretty much the same as the first one. However, you should adopt this only in cases where all of your SAP systems have identical local time settings.  In that case, you can reduce the downtime close to 1 hour instead of 2 hours. In practical terms, here is what you can do:

 

1.      Shutdown SAP a little before 2am before the clock is changed back to 1am

2.      Wait for one hour to pass and the clock moves back to 2am

3.      Bring up SAP

 

If you are unsure when to shutdown the system you can execute a program "endofdst" supplied as attachment in OSS note: 102088 Reducing downtime when changing from summer to winter time. If you are running on a UNIX platform, find the C program "endofdst.c " in the attachment and compile it to run on one of the application servers.

 

This way your SAP system moves from 1am to 2am only once. However, you are keeping it down for the clock's 2nd pass (from 1-2am) for only one hour duration, which avoids ‘duplicate' points in time.

 

Disadvantage:

You need to keep the system down for a little over 1 hour, though better than the two hour downtime required as in Method #1.

 

 

Method-3) Zero Downtime (Slow down the time)

 

Perception of slowing down time.

 

This is a very clever solution and my favorite. In this case, you slow down the time by half, during the double hour, so that the 2 hour period is treated as one hour.  In SAP, executing this is easier than it appears. You set the parameter zdate/DSTswitch_contloctime = on (By the way, this can be dynamically changed through RZ11), so that you can make your SAP system see a continuous time with a deviation of 30 minutes.  (Note that you should check the pre-requisites in the notes, mentioned at end of this article, before executing this).

 

In practical terms, 

1.      At 1am, i.e., one hour before the change of time, your SAP system clock starts running slowly at half the normal speed

2.      For the next two hours, the SAP system will run slow at half speed (don't worry about performance readings during this period; this slow down will just be your perception and not real.)

3.      Hence, the double hour is observed as one continuous hour by SAP.

4.      After two hours duration, the official clock time and SAP time will match and, hence, the system will continue normally from then onwards (with both official and SAP clocks being in sync).

 

For further reading, please refer to the resources at the end of this article.

 

Abbreviations:

DST - Daylight Saving Time

UTC - Universal Time Coordinated

 

Resources:

For a comprehensive history of daylight saving time, read

http://en.wikipedia.org/wiki/Daylight_saving_time

 

For some interesting incidents and anecdotes related to daylight saving, read

http://www.webexhibits.org/daylightsaving/k.html

 

For pre-requisites and official steps for any of the methods described above, read

OSS note: 438660 End of daylight-saving time coming soon, be ready!

OSS note: 102088 Reducing downtime when changing from summer to winter time

OSS note: 7417 Slowing time to adjust daylight saving clock without downtime.

OSS note: 950114 - Profile parameter zdate/DSTswitch_contloctime

https://service.sap.com/sap/support/notes/950114

6 Comments