Possible consequences of failing to apply the Daylight Saving Time (DST) fixes

Technote (troubleshooting)


Problem(Abstract)

Information about the consequences of not updating your systems with the US DST fixes.

Cause

Any US time zone based application which uses time will be affected, in particular during the additional weeks of extended Daylight Saving Time in March and November starting in 2007.

Resolving the problem

The following typical scenarios and operations will produce incorrect results, as a consequence of using the time offset by one hour.

  • Time format and display
  • Time zone name display
  • Operations that check whether a particular date is in daylight savings
  • Computations and/or business logic based on daylight savings time
  • Any of the above that run on a system on which time is set to a time zone other than the US time zone, but does computations based on a US time zone

The following SDK classes provide APIs to use date, time, and time zone functionality:
    java/text/DateFormat
    java/textSimpleDateFormat
    java/util/Date
    java/util/Calendar
    java/util/GregorianCalendar
    java/util/SimpleTimeZone
    java/util/TimeZone
The following examples demonstrate the effects of not applying fixes for the US DST changes:
  • Time will be off by 1 hour for the extended DST period.
  • Time zone name will indicate that the time is not in daylight saving time, though it is, for this extended period

    Example: The following code displays today's date.
      import java.util.Date;
      ...
      Date today = new Date();
      System.out.println( today );

      Actual Output (without US DST changes):
        Mon Mar 12 10:30:14 PST 2007

      Expected Output (with US DST changes):
        Mon Mar 12 11:30:14 PDT 2007

      Where:
      PST - Pacific Standard Time (applicable when DST is not in effect)
      PDT - Pacific Daylight Time (applicable when DST is in effect)
      • Checking if a particular date in the extended period is in daylight saving time returns incorrect results.

        Example: The following code checks whether a date is in daylight saving time or not.
          import java.util.*;
          ...
          TimeZone tz = TimeZone.getDefault();
          Date today = new Date();
          System.out.println( today );
          boolean daylight = tz.inDaylightTime( today );
          System.out.println( "Currently " + (daylight ? "in " : "not in " ) + "daylight saving time." );
          Actual Output (without US DST changes) :
            Mon Mar 12 10:30:14 PST 2007
            Currently not in daylight-savings time.

          Expected Output (with US DST changes):
            Mon Mar 12 11:30:14 PDT 2007
            Currently in daylight-savings time.
        • If computations or any business logic are made based on daylight saving time, incorrect results can be expected.

          Example: The following code demonstrates how computations or business logic executed can vary based on whether a particular date is in daylight.
          import java.util.*;
          ...
          TimeZone tz = TimeZone.getDefault();
          Date today = new Date();
          System.out.println( today );
          boolean daylight = tz.inDaylightTime( today );
          System.out.println( "Currently " + daylight ? "in " : "not in " ) + "daylight-savings time." ) ;
          if(daylight){
          System.out.println("Call computeFunc1");
          computeFunc1();
          }else{
          System.out.println("Call computeFunc2");
          computeFunc2();
          }

          Actual Output (without US DST changes) :
            Mon Mar 12 10:30:14 PST 2007
            Currently not in daylight-savings time.
            Call computeFunc2

          Expected Output (with US DST changes):
            Mon Mar 12 11:30:14 PDT 2007
            Currently in daylight-savings time.
            Call computeFunc1
        • If an application is run on a system on which time is set to a time zone other than a US time zone, but does computations based on a US time zone, incorrect results can be expected.

          Example: The following code demonstrates how a Java program can use date, time, and time zone functionality on any other country's time zone:
          /* The code below checks if a particular date is in daylight saving time in the "America/New_York" time zone. */
          import java.util.*;
          ...
          TimeZone tz=TimeZone.getTimeZone("America/New_York");
          SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
          dateFormat.setTimeZone(timeZone);
          try{
          System.out.println("12/03/2007: " + timeZone.inDaylightTime(dateFormat.parse("12/03/2007")));
          }
          catch (Exception e) {
          e.printStackTrace();
          }

          Actual Output (without US DST changes) :
            12/03/2007: false

          Expected Output (with US DST changes):
            12/03/2007: true
        Note: All the output in the previous examples assumes that the date on the host system is set to 12 March 2007, which is in daylight saving time as a result of time zone changes being implemented in the US in 2007.

        Examples of possible business impact:
        • Travel industry: Errors in date and time for arrivals and departures.
        • Errors in scheduled bank transactions possibly resulting in late payments and customer dissatisfaction.
        • Errors resulting in loss of customer benefit (for example, application for admission to a college with a timed deadline could result in student not receiving admission).
        • Errors resulting in legal liability (for example, errors in a web based system for submitting legal briefs could lead to the brief not being submitted on time).
        • Sales that take effect or end at certain times. Miscalculation could lead to customer dissatisfaction at missing sale.
        • Sales projection calculations (by hour) would be erroneous.
        • Cell phone rate calculations (charges based on when "night minutes" begin) could be affected.
        • Errors in calendar management (scheduling meetings, for example).

        In short, any date or time calculation could be affected.

        For more details on DST and WebSphere Application Server SDK, refer to:
        Guidance on updating Java SDKs and JREs for Daylight Saving Time (DST) changes


        Cross reference information
        Segment Product Component Platform Version Edition
        Application Servers WebSphere Application Server - Express Java development Edition Independent
        Application Servers Runtimes for Java Technology DST
        Business Integration WebSphere Business Integration Server Foundation
        Application Servers WebSphere Application Server for z/OS Java SDK
        Application Servers WebSphere Application Server for z/OS z/OS 6.0

        Rate this page:

        (0 users)Average rating

        Document information


        More support for:

        WebSphere Application Server
        Java SDK

        Software version:

        3.5, 4.0, 5.1, 6.0

        Operating system(s):

        AIX, HP-UX, IBM i, Linux, Solaris, Windows

        Software edition:

        Advanced, Base, Developer, Enterprise, Express, Network Deployment, Single Server, WebSphere Business Integrations Server Foundation

        Reference #:

        1246846

        Modified date:

        2006-12-12

        Translate my page

        Machine Translation

        Content navigation