< prev index next >

test/java/util/TimeZone/Bug6772689.java

Print this page




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 6772689

  27  * @summary Test for standard-to-daylight transitions at midnight:
  28  * date stays on the given day.
  29  */
  30 
  31 import java.util.Calendar;
  32 import java.util.Date;
  33 import java.util.GregorianCalendar;
  34 import java.util.TimeZone;
  35 import static java.util.GregorianCalendar.*;
  36 
  37 public class Bug6772689 {
  38     private static final int BEGIN_YEAR = 2035;
  39     private static final int END_YEAR = BEGIN_YEAR + 28;
  40 
  41     public static void main(String[] args) {
  42         TimeZone defaultTimeZone = TimeZone.getDefault();
  43         int errors = 0;
  44 
  45         Calendar cal = new GregorianCalendar(BEGIN_YEAR, MARCH, 1);
  46         String[] tzids = TimeZone.getAvailableIDs();




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 6772689
  27  * @key intermittent
  28  * @summary Test for standard-to-daylight transitions at midnight:
  29  * date stays on the given day.
  30  */
  31 
  32 import java.util.Calendar;
  33 import java.util.Date;
  34 import java.util.GregorianCalendar;
  35 import java.util.TimeZone;
  36 import static java.util.GregorianCalendar.*;
  37 
  38 public class Bug6772689 {
  39     private static final int BEGIN_YEAR = 2035;
  40     private static final int END_YEAR = BEGIN_YEAR + 28;
  41 
  42     public static void main(String[] args) {
  43         TimeZone defaultTimeZone = TimeZone.getDefault();
  44         int errors = 0;
  45 
  46         Calendar cal = new GregorianCalendar(BEGIN_YEAR, MARCH, 1);
  47         String[] tzids = TimeZone.getAvailableIDs();


< prev index next >