JDK-6633085 : (tz) The first hour after DST in Brazil for Fall 2007 is reported as 11:00 pm on the previous day
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 1.3.1_21
  • Priority: P1
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_2003
  • CPU: x86
  • Submitted: 2007-11-21
  • Updated: 2010-08-03
  • Resolved: 2007-11-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.3.1_21Resolved
Related Reports
Duplicate :  
Description
Brazilian Daylight Savings Time changed this year to start at midnight Sunday Oct 14th '07.
The first hour of the new day is reported as the last hour of the previous day.
Here are the results of some testing.



E:\Documents and Settings\jdsuser>java -version
java version "1.3.1_21"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_21-b02)
Java HotSpot(TM) Client VM (build 1.3.1_21-b02, mixed mode)


E:\Documents and Settings\jdsuser>java -showversion -Duser.timezone=America/Sao_Paulo TestDST "10/14/2007 0:0:0 AM"
java version "1.3.1_21"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_21-b02)
Java HotSpot(TM) Client VM (build 1.3.1_21-b02, mixed mode)

Saturday, October 13, 2007 11:00:00 PM BRT (America/Sao_Paulo) is not in daylight-savings time.    <----------------***

E:\Documents and Settings\jdsuser>java -showversion -Duser.timezone=America/Sao_Paulo TestDST "10/13/2007 11:59:59 PM"
java version "1.3.1_21"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_21-b02)
Java HotSpot(TM) Client VM (build 1.3.1_21-b02, mixed mode)

Saturday, October 13, 2007 11:59:59 PM BRT (America/Sao_Paulo) is not in daylight-savings time.    <----------------***

E:\Documents and Settings\jdsuser>java -showversion -Duser.timezone=America/Sao_Paulo TestDST "10/14/2007 0:0:1 AM"
java version "1.3.1_21"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_21-b02)
Java HotSpot(TM) Client VM (build 1.3.1_21-b02, mixed mode)

Saturday, October 13, 2007 11:00:01 PM BRT (America/Sao_Paulo) is not in daylight-savings time.    <----------------***

E:\Documents and Settings\jdsuser>java -showversion -Duser.timezone=America/Sao_Paulo TestDST "10/14/2007 0:59:59 AM"
java version "1.3.1_21"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_21-b02)
Java HotSpot(TM) Client VM (build 1.3.1_21-b02, mixed mode)

Saturday, October 13, 2007 11:59:59 PM BRT (America/Sao_Paulo) is not in daylight-savings time.    <----------------***

E:\Documents and Settings\jdsuser>java -showversion -Duser.timezone=America/Sao_Paulo TestDST "10/14/2007 1:0:0 AM"
java version "1.3.1_21"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_21-b02)
Java HotSpot(TM) Client VM (build 1.3.1_21-b02, mixed mode)

Sunday, October 14, 2007 1:00:00 AM BRST (America/Sao_Paulo) is in daylight-savings time.        <----------------***




This is the test case.

// author:  Johann Loefflmann
import java.util.*;
import java.text.*;

public class TestDST {

   private static final String DATE_FORMAT_PATTERN = "MM/dd/yyyy hh:mm:ss a";

   public static void main(String args[]) {

      if (args.length < 1) {
         System.out.println("Syntax:  java TestDST \""+ DATE_FORMAT_PATTERN +"\"\n"
                           +"Example: java TestDST \"03/11/2007 2:00:00 AM\"");
         System.exit(0);
      }
   
      String testDate = args[0];
      TimeZone timeZone = TimeZone.getDefault();
      SimpleDateFormat inFormat = new SimpleDateFormat(DATE_FORMAT_PATTERN);
      DateFormat outFormat = DateFormat.getDateTimeInstance(DateFormat.FULL, DateFormat.FULL);
      Date date = inFormat.parse(testDate, new ParsePosition(0));
      
      System.out.println(outFormat.format(date)
          + " (" + timeZone.getID() + ")"
          + " is " 
          + (timeZone.inDaylightTime(date) ? "" : "not ")  
          + "in daylight-savings time.");

    }
}

Comments
EVALUATION This is a duplicate of 4845752. As suggested in 4845752, please escalate 4845752 if a fix is required in 1.3.1_xx.
30-11-2007