author | serb |
Tue, 12 Nov 2013 20:24:25 +0400 | |
changeset 21596 | 0e3a39f29dbc |
parent 5506 | 202f599c92aa |
child 23010 | 6dadb192ad81 |
permissions | -rw-r--r-- |
3738
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
1 |
/* |
5506 | 2 |
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. |
3738
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
4 |
* |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
21596 | 7 |
* published by the Free Software Foundation. |
3738
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
8 |
* |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
13 |
* accompanied this code). |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
14 |
* |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
18 |
* |
5506 | 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. |
|
3738
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
22 |
*/ |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
23 |
|
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
24 |
/** |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
25 |
* @test |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
26 |
* @bug 6851214 |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
27 |
* @summary Allow 24:00 as a valid end/start DST time stamp |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
28 |
* @run main ListTimeZones |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
29 |
*/ |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
30 |
|
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
31 |
import java.util.*; |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
32 |
|
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
33 |
public class ListTimeZones{ |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
34 |
public static void main(String[] args){ |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
35 |
Date date = new Date(); |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
36 |
String TimeZoneIds[] = TimeZone.getAvailableIDs(); |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
37 |
for(int i = 0; i < TimeZoneIds.length; i++){ |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
38 |
TimeZone tz = TimeZone.getTimeZone(TimeZoneIds[i]); |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
39 |
Calendar calendar = new GregorianCalendar(tz); |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
40 |
String calString = calendar.toString(); |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
41 |
} |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
42 |
} |
837612df050f
6851214: (tz) New Jordan rule creates a failure for SimpleTimeZone parsing post tzdata2009h
peytoia
parents:
diff
changeset
|
43 |
} |