提交 8af1fb02 编写于 作者: A asaha

Merge

......@@ -491,3 +491,4 @@ ea602badedd0cd0c352c072220a884e8f1335e33 jdk8u66-b15
e6d562c0f079dfd1e21c3734b2dca16f4b2e2494 jdk8u66-b17
be5faa9c77042f202106c18f4e8ea211137b4a3b jdk8u72-b00
5ad1e9e8e8417f80c91d7e0f1f44cdf89b34ead3 jdk8u72-b01
ab0c1040414d038ccbcfcc8ceb1ccf2f44ead8e4 jdk8u72-b02
......@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
tzdata2015f
tzdata2015g
......@@ -154,7 +154,8 @@ Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2
# Azerbaijan
# From Rustam Aliyev of the Azerbaijan Internet Forum (2005-10-23):
# According to the resolution of Cabinet of Ministers, 1997
# Resolution available at: http://aif.az/docs/daylight_res.pdf
# From Paul Eggert (2015-09-17): It was Resolution No. 21 (1997-03-17).
# http://code.az/files/daylight_res.pdf
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Azer 1997 max - Mar lastSun 4:00 1:00 S
Rule Azer 1997 max - Oct lastSun 5:00 0 -
......@@ -1740,11 +1741,12 @@ Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S
# the 8:30 time zone on August 15, one example:
# http://www.bbc.com/news/world-asia-33815049
#
# From Paul Eggert (2015-08-07):
# No transition time is specified; assume 00:00.
# From Paul Eggert (2015-08-15):
# Bells rang out midnight (00:00) Friday as part of the celebrations. See:
# Talmadge E. North Korea celebrates new time zone, 'Pyongyang Time'
# http://news.yahoo.com/north-korea-celebrates-time-zone-pyongyang-time-164038128.html
# There is no common English-language abbreviation for this time zone.
# Use %z rather than invent one. We can't assume %z works everywhere yet,
# so for now substitute its output manually.
# Use KST, as that's what we already use for 1954-1961 in ROK.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1
......@@ -1758,7 +1760,7 @@ Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1
8:30 - KST 1912 Jan 1
9:00 - JCST 1937 Oct 1
9:00 - JST 1945 Aug 24
9:00 - KST 2015 Aug 15
9:00 - KST 2015 Aug 15 00:00
8:30 - KST
###############################################################################
......
......@@ -358,10 +358,17 @@ Zone Indian/Cocos 6:27:40 - LMT 1900
# DST will start Nov. 2 this year.
# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-NOVEMBER-2ND.aspx
# From Paul Eggert (2014-10-20):
# From a government order dated 2015-08-26 and published as Legal Notice No. 77
# in the Government of Fiji Gazette Supplement No. 24 (2015-08-28),
# via Ken Rylander (2015-09-02):
# the daylight saving period is 1 hour in advance of the standard time
# commencing at 2.00 am on Sunday 1st November, 2015 and ending at
# 3.00 am on Sunday 17th January, 2016.
# From Paul Eggert (2015-09-01):
# For now, guess DST from 02:00 the first Sunday in November to
# 03:00 the first Sunday on or after January 18. Although ad hoc, it
# matches this year's plan and seems more likely to match future
# 03:00 the third Sunday in January. Although ad hoc, it matches
# transitions since late 2014 and seems more likely to match future
# practice than guessing no DST.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
......@@ -374,7 +381,7 @@ Rule Fiji 2011 only - Mar Sun>=1 3:00 0 -
Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 -
Rule Fiji 2014 only - Jan Sun>=18 2:00 0 -
Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 S
Rule Fiji 2015 max - Jan Sun>=18 3:00 0 -
Rule Fiji 2015 max - Jan Sun>=15 3:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
12:00 Fiji FJ%sT # Fiji Time
......@@ -533,7 +540,10 @@ Zone Pacific/Niue -11:19:40 - LMT 1901 # Alofi
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Norfolk 11:11:52 - LMT 1901 # Kingston
11:12 - NMT 1951 # Norfolk Mean Time
11:30 - NFT # Norfolk Time
11:30 - NFT 1974 Oct 27 02:00 # Norfolk T.
11:30 1:00 NFST 1975 Mar 2 02:00
11:30 - NFT 2015 Oct 4 02:00
11:00 - NFT
# Palau (Belau)
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
......@@ -1573,6 +1583,20 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# started DST on June 3. Possibly DST was observed other years
# in Midway, but we have no record of it.
# Norfolk
# From Alexander Krivenyshev (2015-09-23):
# Norfolk Island will change ... from +1130 to +1100:
# https://www.comlaw.gov.au/Details/F2015L01483/Explanatory%20Statement/Text
# ... at 12.30 am (by legal time in New South Wales) on 4 October 2015.
# http://www.norfolkisland.gov.nf/nia/MediaRelease/Media%20Release%20Norfolk%20Island%20Standard%20Time%20Change.pdf
# From Paul Eggert (2015-09-23):
# Transitions before 2015 are from timeanddate.com, which consulted
# the Norfolk Island Museum and the Australian Bureau of Meteorology's
# Norfolk Island station, and found no record of Norfolk observing DST
# other than in 1974/5. See:
# http://www.timeanddate.com/time/australia/norfolk-island.html
# Pitcairn
......
......@@ -3173,6 +3173,11 @@ Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment.
# http://www.balkaneu.com/eventful-elections-turkey/ 2014-03-30.
# I guess the best we can do is document the official time.
# From Fatih (2015-09-29):
# It's officially announced now by the Ministry of Energy.
# Turkey delays winter time to 8th of November 04:00
# http://www.aa.com.tr/tr/turkiye/yaz-saati-uygulamasi-8-kasimda-sona-erecek/362217
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Turkey 1916 only - May 1 0:00 1:00 S
Rule Turkey 1916 only - Oct 1 0:00 0 -
......@@ -3242,6 +3247,8 @@ Zone Europe/Istanbul 1:55:52 - LMT 1880
2:00 - EET 2011 Mar 28 1:00u
2:00 EU EE%sT 2014 Mar 30 1:00u
2:00 - EET 2014 Mar 31 1:00u
2:00 EU EE%sT 2015 Oct 25 1:00u
2:00 1:00 EEST 2015 Nov 8 1:00u
2:00 EU EE%sT
Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
......
......@@ -1849,6 +1849,22 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep
# The transition dates (and times) are guesses.
# From Matt Johnson (2015-09-21):
# Fort Nelson, BC, Canada will cancel DST this year. So while previously they
# were aligned with America/Vancouver, they're now aligned with
# America/Dawson_Creek.
# http://www.northernrockies.ca/EN/meta/news/archives/2015/northern-rockies-time-change.html
#
# From Tim Parenti (2015-09-23):
# This requires a new zone for the Northern Rockies Regional Municipality,
# America/Fort_Nelson. The resolution of 2014-12-08 was reached following a
# 2014-11-15 poll with nearly 75% support. Effectively, the municipality has
# been on MST (-0700) like Dawson Creek since it advanced its clocks on
# 2015-03-08.
#
# From Paul Eggert (2015-09-23):
# Shanks says Fort Nelson did not observe DST in 1946, unlike Vancouver.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Vanc 1918 only - Apr 14 2:00 1:00 D
Rule Vanc 1918 only - Oct 27 2:00 0 S
......@@ -1867,6 +1883,12 @@ Zone America/Dawson_Creek -8:00:56 - LMT 1884
-8:00 Canada P%sT 1947
-8:00 Vanc P%sT 1972 Aug 30 2:00
-7:00 - MST
Zone America/Fort_Nelson -8:10:47 - LMT 1884
-8:00 Vanc P%sT 1946
-8:00 - PST 1947
-8:00 Vanc P%sT 1987
-8:00 Canada P%sT 2015 Mar 8 2:00
-7:00 - MST
Zone America/Creston -7:46:04 - LMT 1884
-7:00 - MST 1916 Oct 1
-8:00 - PST 1918 Jun 2
......
......@@ -152,6 +152,7 @@ CA +6227-11421 America/Yellowknife Mountain Time - central Northwest Territories
CA +682059-1334300 America/Inuvik Mountain Time - west Northwest Territories
CA +4906-11631 America/Creston Mountain Standard Time - Creston, British Columbia
CA +5946-12014 America/Dawson_Creek Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia
CA +5848-12242 America/Fort_Nelson Mountain Standard Time - Fort Nelson, British Columbia
CA +4916-12307 America/Vancouver Pacific Time - west British Columbia
CA +6043-13503 America/Whitehorse Pacific Time - south Yukon
CA +6404-13925 America/Dawson Pacific Time - north Yukon
......
......@@ -54,7 +54,8 @@ public class CDataTransferer extends DataTransferer {
"PDF",
"URL",
"PNG",
"JFIF"
"JFIF",
"XPICT"
};
static {
......@@ -78,6 +79,7 @@ public class CDataTransferer extends DataTransferer {
public static final int CF_URL = 7;
public static final int CF_PNG = 8;
public static final int CF_JPEG = 9;
public static final int CF_XPICT = 10;
private CDataTransferer() {}
......
......@@ -81,3 +81,4 @@ RICH_TEXT=text/rtf
HTML=text/html;charset=utf-8;eoln="\r\n";terminators=1
URL=application/x-java-url;class=java.net.URL
URL=text/uri-list;eoln="\r\n";terminators=1
XPICT=image/x-pict;class=java.io.InputStream
......@@ -58,6 +58,8 @@ NSMutableDictionary *getMappingTable() {
forKey:[NSNumber numberWithLong:sun_lwawt_macosx_CDataTransferer_CF_PNG]];
[sStandardMappings setObject:(NSString*)kUTTypeJPEG
forKey:[NSNumber numberWithLong:sun_lwawt_macosx_CDataTransferer_CF_JPEG]];
[sStandardMappings setObject:NSPICTPboardType
forKey:[NSNumber numberWithLong:sun_lwawt_macosx_CDataTransferer_CF_XPICT]];
}
return sStandardMappings;
}
......
......@@ -1722,7 +1722,7 @@ public class SimpleDateFormat extends DateFormat {
}
return (start + zoneNames[nameIndex].length());
}
return 0;
return -start;
}
/**
......
......@@ -328,6 +328,7 @@ public class FileChannelImpl
int rv = -1;
long p = -1;
int ti = -1;
long rp = -1;
try {
begin();
ti = threads.add();
......@@ -363,8 +364,8 @@ public class FileChannelImpl
if (p > newSize)
p = newSize;
do {
rv = (int)position0(fd, p);
} while ((rv == IOStatus.INTERRUPTED) && isOpen());
rp = position0(fd, p);
} while ((rp == IOStatus.INTERRUPTED) && isOpen());
return this;
} finally {
threads.remove(ti);
......
......@@ -430,6 +430,7 @@ public final class TimeZoneNames extends TimeZoneNamesBundle {
{"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Nelson", MST},
{"America/Fort_Wayne", EST},
{"America/Fortaleza", BRT},
{"America/Glace_Bay", AST},
......
......@@ -431,6 +431,7 @@ public final class TimeZoneNames_de extends TimeZoneNamesBundle {
{"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Nelson", MST},
{"America/Fort_Wayne", EST},
{"America/Fortaleza", BRT},
{"America/Glace_Bay", AST},
......
......@@ -47,7 +47,8 @@ public final class TimeZoneNames_en_GB extends TimeZoneNamesBundle {
protected final Object[][] getContents() {
return new Object[][] {
{"Europe/London", new String[] {"Greenwich Mean Time", "GMT",
"British Summer Time", "BST"}},
"British Summer Time", "BST",
"British Time", "BT"}},
};
}
}
......@@ -431,6 +431,7 @@ public final class TimeZoneNames_es extends TimeZoneNamesBundle {
{"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Nelson", MST},
{"America/Fort_Wayne", EST},
{"America/Fortaleza", BRT},
{"America/Glace_Bay", AST},
......
......@@ -431,6 +431,7 @@ public final class TimeZoneNames_fr extends TimeZoneNamesBundle {
{"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Nelson", MST},
{"America/Fort_Wayne", EST},
{"America/Fortaleza", BRT},
{"America/Glace_Bay", AST},
......
......@@ -40,7 +40,8 @@ public final class TimeZoneNames_hi extends TimeZoneNamesBundle {
{"Asia/Calcutta",
new String[] {
"\u092d\u093e\u0930\u0924\u0940\u092f \u0938\u092e\u092f", "IST",
"\u092d\u093e\u0930\u0924\u0940\u092f \u0938\u092e\u092f", "IST"
"\u092d\u093e\u0930\u0924\u0940\u092f \u0938\u092e\u092f", "IST",
"\u092d\u093e\u0930\u0924\u0940\u092f \u0938\u092e\u092f", "IT"
}
},
};
......
......@@ -431,6 +431,7 @@ public final class TimeZoneNames_it extends TimeZoneNamesBundle {
{"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Nelson", MST},
{"America/Fort_Wayne", EST},
{"America/Fortaleza", BRT},
{"America/Glace_Bay", AST},
......
......@@ -431,6 +431,7 @@ public final class TimeZoneNames_ja extends TimeZoneNamesBundle {
{"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Nelson", MST},
{"America/Fort_Wayne", EST},
{"America/Fortaleza", BRT},
{"America/Glace_Bay", AST},
......
......@@ -431,6 +431,7 @@ public final class TimeZoneNames_ko extends TimeZoneNamesBundle {
{"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Nelson", MST},
{"America/Fort_Wayne", EST},
{"America/Fortaleza", BRT},
{"America/Glace_Bay", AST},
......
......@@ -431,6 +431,7 @@ public final class TimeZoneNames_pt_BR extends TimeZoneNamesBundle {
{"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Nelson", MST},
{"America/Fort_Wayne", EST},
{"America/Fortaleza", BRT},
{"America/Glace_Bay", AST},
......
......@@ -431,6 +431,7 @@ public final class TimeZoneNames_sv extends TimeZoneNamesBundle {
{"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Nelson", MST},
{"America/Fort_Wayne", EST},
{"America/Fortaleza", BRT},
{"America/Glace_Bay", AST},
......
......@@ -431,6 +431,7 @@ public final class TimeZoneNames_zh_CN extends TimeZoneNamesBundle {
{"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Nelson", MST},
{"America/Fort_Wayne", EST},
{"America/Fortaleza", BRT},
{"America/Glace_Bay", AST},
......
......@@ -431,6 +431,7 @@ public final class TimeZoneNames_zh_TW extends TimeZoneNamesBundle {
{"America/Eirunepe", ACT},
{"America/El_Salvador", CST},
{"America/Ensenada", PST},
{"America/Fort_Nelson", MST},
{"America/Fort_Wayne", EST},
{"America/Fortaleza", BRT},
{"America/Glace_Bay", AST},
......
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 8137121 8137230
* @summary (fc) Infinite loop FileChannel.truncate
* @library /lib/testlibrary
* @build jdk.testlibrary.Utils
* @run main/othervm LoopingTruncate
*/
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.channels.ClosedByInterruptException;
import java.nio.file.Files;
import java.nio.file.Path;
import static java.nio.file.StandardOpenOption.*;
import static jdk.testlibrary.Utils.adjustTimeout;
public class LoopingTruncate {
// (int)FATEFUL_SIZE == -3 == IOStatus.INTERRUPTED
static long FATEFUL_SIZE = 0x1FFFFFFFDL;
// At least 20 seconds
static long TIMEOUT = adjustTimeout(20_000);
public static void main(String[] args) throws Throwable {
Path path = Files.createTempFile("LoopingTruncate.tmp", null);
try (FileChannel fc = FileChannel.open(path, CREATE, WRITE)) {
fc.position(FATEFUL_SIZE + 1L);
fc.write(ByteBuffer.wrap(new byte[] {0}));
Thread th = new Thread(() -> {
try {
fc.truncate(FATEFUL_SIZE);
} catch (ClosedByInterruptException ignore) {
} catch (Exception e) {
throw new RuntimeException(e);
}});
th.start();
th.join(TIMEOUT);
if (th.isAlive()) {
System.err.println("=== Stack trace of the guilty thread:");
for (StackTraceElement el : th.getStackTrace()) {
System.err.println("\t" + el);
}
System.err.println("===");
th.interrupt();
th.join();
throw new RuntimeException("Failed to complete on time");
}
} finally {
Files.deleteIfExists(path);
}
}
}
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8081794
* @summary ParsePosition getErrorIndex should return correct index
*/
import java.text.ParsePosition;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
public class Bug8081794 {
public static void main(String[] args) {
String date = "13 Jan 2005 21:45:34 ABC";
String format = "dd MMM yyyy HH:mm:ss z";
ParsePosition pp = new ParsePosition(0);
pp.setIndex(0);
SimpleDateFormat sd = new SimpleDateFormat(format, Locale.ENGLISH);
Date d = sd.parse(date, pp);
int errorIndex = pp.getErrorIndex();
if (errorIndex == 21) {
System.out.println(": passed");
} else {
System.out.println(": failed");
throw new RuntimeException("Failed with wrong index: " + errorIndex);
}
}
}
......@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
tzdata2015f
tzdata2015g
......@@ -154,7 +154,8 @@ Zone Asia/Yerevan 2:58:00 - LMT 1924 May 2
# Azerbaijan
# From Rustam Aliyev of the Azerbaijan Internet Forum (2005-10-23):
# According to the resolution of Cabinet of Ministers, 1997
# Resolution available at: http://aif.az/docs/daylight_res.pdf
# From Paul Eggert (2015-09-17): It was Resolution No. 21 (1997-03-17).
# http://code.az/files/daylight_res.pdf
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Azer 1997 max - Mar lastSun 4:00 1:00 S
Rule Azer 1997 max - Oct lastSun 5:00 0 -
......@@ -1740,11 +1741,12 @@ Rule ROK 1987 1988 - Oct Sun>=8 3:00 0 S
# the 8:30 time zone on August 15, one example:
# http://www.bbc.com/news/world-asia-33815049
#
# From Paul Eggert (2015-08-07):
# No transition time is specified; assume 00:00.
# From Paul Eggert (2015-08-15):
# Bells rang out midnight (00:00) Friday as part of the celebrations. See:
# Talmadge E. North Korea celebrates new time zone, 'Pyongyang Time'
# http://news.yahoo.com/north-korea-celebrates-time-zone-pyongyang-time-164038128.html
# There is no common English-language abbreviation for this time zone.
# Use %z rather than invent one. We can't assume %z works everywhere yet,
# so for now substitute its output manually.
# Use KST, as that's what we already use for 1954-1961 in ROK.
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1
......@@ -1758,7 +1760,7 @@ Zone Asia/Pyongyang 8:23:00 - LMT 1908 Apr 1
8:30 - KST 1912 Jan 1
9:00 - JCST 1937 Oct 1
9:00 - JST 1945 Aug 24
9:00 - KST 2015 Aug 15
9:00 - KST 2015 Aug 15 00:00
8:30 - KST
###############################################################################
......
......@@ -358,10 +358,17 @@ Zone Indian/Cocos 6:27:40 - LMT 1900
# DST will start Nov. 2 this year.
# http://www.fiji.gov.fj/Media-Center/Press-Releases/DAYLIGHT-SAVING-STARTS-ON-SUNDAY,-NOVEMBER-2ND.aspx
# From Paul Eggert (2014-10-20):
# From a government order dated 2015-08-26 and published as Legal Notice No. 77
# in the Government of Fiji Gazette Supplement No. 24 (2015-08-28),
# via Ken Rylander (2015-09-02):
# the daylight saving period is 1 hour in advance of the standard time
# commencing at 2.00 am on Sunday 1st November, 2015 and ending at
# 3.00 am on Sunday 17th January, 2016.
# From Paul Eggert (2015-09-01):
# For now, guess DST from 02:00 the first Sunday in November to
# 03:00 the first Sunday on or after January 18. Although ad hoc, it
# matches this year's plan and seems more likely to match future
# 03:00 the third Sunday in January. Although ad hoc, it matches
# transitions since late 2014 and seems more likely to match future
# practice than guessing no DST.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
......@@ -374,7 +381,7 @@ Rule Fiji 2011 only - Mar Sun>=1 3:00 0 -
Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 -
Rule Fiji 2014 only - Jan Sun>=18 2:00 0 -
Rule Fiji 2014 max - Nov Sun>=1 2:00 1:00 S
Rule Fiji 2015 max - Jan Sun>=18 3:00 0 -
Rule Fiji 2015 max - Jan Sun>=15 3:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
12:00 Fiji FJ%sT # Fiji Time
......@@ -533,7 +540,10 @@ Zone Pacific/Niue -11:19:40 - LMT 1901 # Alofi
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Pacific/Norfolk 11:11:52 - LMT 1901 # Kingston
11:12 - NMT 1951 # Norfolk Mean Time
11:30 - NFT # Norfolk Time
11:30 - NFT 1974 Oct 27 02:00 # Norfolk T.
11:30 1:00 NFST 1975 Mar 2 02:00
11:30 - NFT 2015 Oct 4 02:00
11:00 - NFT
# Palau (Belau)
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
......@@ -1573,6 +1583,20 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901
# started DST on June 3. Possibly DST was observed other years
# in Midway, but we have no record of it.
# Norfolk
# From Alexander Krivenyshev (2015-09-23):
# Norfolk Island will change ... from +1130 to +1100:
# https://www.comlaw.gov.au/Details/F2015L01483/Explanatory%20Statement/Text
# ... at 12.30 am (by legal time in New South Wales) on 4 October 2015.
# http://www.norfolkisland.gov.nf/nia/MediaRelease/Media%20Release%20Norfolk%20Island%20Standard%20Time%20Change.pdf
# From Paul Eggert (2015-09-23):
# Transitions before 2015 are from timeanddate.com, which consulted
# the Norfolk Island Museum and the Australian Bureau of Meteorology's
# Norfolk Island station, and found no record of Norfolk observing DST
# other than in 1974/5. See:
# http://www.timeanddate.com/time/australia/norfolk-island.html
# Pitcairn
......
......@@ -3173,6 +3173,11 @@ Zone Europe/Zurich 0:34:08 - LMT 1853 Jul 16 # See above comment.
# http://www.balkaneu.com/eventful-elections-turkey/ 2014-03-30.
# I guess the best we can do is document the official time.
# From Fatih (2015-09-29):
# It's officially announced now by the Ministry of Energy.
# Turkey delays winter time to 8th of November 04:00
# http://www.aa.com.tr/tr/turkiye/yaz-saati-uygulamasi-8-kasimda-sona-erecek/362217
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Turkey 1916 only - May 1 0:00 1:00 S
Rule Turkey 1916 only - Oct 1 0:00 0 -
......@@ -3242,6 +3247,8 @@ Zone Europe/Istanbul 1:55:52 - LMT 1880
2:00 - EET 2011 Mar 28 1:00u
2:00 EU EE%sT 2014 Mar 30 1:00u
2:00 - EET 2014 Mar 31 1:00u
2:00 EU EE%sT 2015 Oct 25 1:00u
2:00 1:00 EEST 2015 Nov 8 1:00u
2:00 EU EE%sT
Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
......
......@@ -1849,6 +1849,22 @@ Zone America/Edmonton -7:33:52 - LMT 1906 Sep
# The transition dates (and times) are guesses.
# From Matt Johnson (2015-09-21):
# Fort Nelson, BC, Canada will cancel DST this year. So while previously they
# were aligned with America/Vancouver, they're now aligned with
# America/Dawson_Creek.
# http://www.northernrockies.ca/EN/meta/news/archives/2015/northern-rockies-time-change.html
#
# From Tim Parenti (2015-09-23):
# This requires a new zone for the Northern Rockies Regional Municipality,
# America/Fort_Nelson. The resolution of 2014-12-08 was reached following a
# 2014-11-15 poll with nearly 75% support. Effectively, the municipality has
# been on MST (-0700) like Dawson Creek since it advanced its clocks on
# 2015-03-08.
#
# From Paul Eggert (2015-09-23):
# Shanks says Fort Nelson did not observe DST in 1946, unlike Vancouver.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Vanc 1918 only - Apr 14 2:00 1:00 D
Rule Vanc 1918 only - Oct 27 2:00 0 S
......@@ -1867,6 +1883,12 @@ Zone America/Dawson_Creek -8:00:56 - LMT 1884
-8:00 Canada P%sT 1947
-8:00 Vanc P%sT 1972 Aug 30 2:00
-7:00 - MST
Zone America/Fort_Nelson -8:10:47 - LMT 1884
-8:00 Vanc P%sT 1946
-8:00 - PST 1947
-8:00 Vanc P%sT 1987
-8:00 Canada P%sT 2015 Mar 8 2:00
-7:00 - MST
Zone America/Creston -7:46:04 - LMT 1884
-7:00 - MST 1916 Oct 1
-8:00 - PST 1918 Jun 2
......
......@@ -152,6 +152,7 @@ CA +6227-11421 America/Yellowknife Mountain Time - central Northwest Territories
CA +682059-1334300 America/Inuvik Mountain Time - west Northwest Territories
CA +4906-11631 America/Creston Mountain Standard Time - Creston, British Columbia
CA +5946-12014 America/Dawson_Creek Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia
CA +5848-12242 America/Fort_Nelson Mountain Standard Time - Fort Nelson, British Columbia
CA +4916-12307 America/Vancouver Pacific Time - west British Columbia
CA +6043-13503 America/Whitehorse Pacific Time - south Yukon
CA +6404-13925 America/Dawson Pacific Time - north Yukon
......
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8139107
* @summary Test that date parsing with DateTimeFormatter pattern
* that contains timezone field doesn't trigger NPE. All supported
* locales are tested.
* @run testng/othervm -Djava.locale.providers=JRE,SPI Bug8139107
*/
import java.time.format.DateTimeFormatter;
import java.util.Locale;
import org.testng.annotations.Test;
public class Bug8139107 {
@Test
public void testSupportedLocales() {
for (Locale loc:Locale.getAvailableLocales()) {
testLocale(loc);
}
}
//Test one locale
void testLocale(Locale tl) {
System.out.println("Locale:" + tl);
DateTimeFormatter inputDateTimeFormat = DateTimeFormatter
.ofPattern(pattern)
.withLocale(tl);
System.out.println("Parse result: " + inputDateTimeFormat.parse(inputDate));
}
// Input date time string with short time zone name
static final String inputDate = "06-10-2015 18:58:04 MSK";
// Pattern with time zone field
static final String pattern = "dd-MM-yyyy HH:mm:ss z";
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册