Mercurial > hg > icedtea8-forest > jdk
changeset 12530:cfc292a2c1c6 icedtea-3.4.0
Merge jdk8u131-b11
line wrap: on
line diff
--- a/.hgtags Tue May 09 03:09:51 2017 +0100 +++ b/.hgtags Tue May 09 04:03:50 2017 +0100 @@ -716,3 +716,15 @@ 7e0b701f3ee0469c3bcfbe9c0a4e7cd83f6735c9 icedtea-3.3.0pre02 3642a826880bb11bf6e81b692e2503aa512d82b6 icedtea-3.3.0 5ee8253969ddefb0426a76c03d31e08cbc773691 icedtea-3.4.0pre01 +2974746e56192cdd14fc2dd43179bcf28e4faf4a jdk8u121-b13 +032874d46bf95478cb86690b3c91d335c0764b0b jdk8u131-b00 +bea5b22daf5ddd941f3bcbf7a4e5fc5244ceb788 jdk8u131-b01 +a01d217a232906e82f80e5bc3db4d60c4c74716e jdk8u131-b02 +3d2dfed2b420a59c68e5deedd257eb630f88b3da jdk8u131-b03 +0f7d02f565658a89b073ee77c296f33148c50da3 jdk8u131-b04 +af0e709d28f9124dd2c37069e0bf4c0751248c61 jdk8u131-b05 +3c7f99282d1b5e29f7466bf25fb6878bfebfc58a jdk8u131-b06 +f5d0aadb4d1ca74eda4e98cc0030f1618ef4c870 jdk8u131-b07 +6e362e6002abc39c63fc8ab4bcebf08e273f5a94 jdk8u131-b08 +40d00399869d8a28cfecf360234f340e9e0ad3b1 jdk8u131-b09 +c0091a673d766ce2e76a945bab6de325fe78dd88 jdk8u131-b10
--- a/make/data/tzdata/VERSION Tue May 09 03:09:51 2017 +0100 +++ b/make/data/tzdata/VERSION Tue May 09 04:03:50 2017 +0100 @@ -21,4 +21,4 @@ # or visit www.oracle.com if you need additional information or have any # questions. # -tzdata2016i +tzdata2017a
--- a/make/data/tzdata/africa Tue May 09 03:09:51 2017 +0100 +++ b/make/data/tzdata/africa Tue May 09 04:03:50 2017 +0100 @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-20): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -54,39 +54,33 @@ # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # +# European-style abbreviations are commonly used along the Mediterranean. +# For sub-Saharan Africa abbreviations were less standardized. # Previous editions of this database used WAT, CAT, SAT, and EAT -# for +0:00 through +3:00, respectively, -# but Mark R V Murray reports that -# 'SAST' is the official abbreviation for +2:00 in the country of South Africa, -# 'CAT' is commonly used for +2:00 in countries north of South Africa, and -# 'WAT' is probably the best name for +1:00, as the common phrase for +# for UT +00 through +03, respectively, +# but in 1997 Mark R V Murray reported that +# 'SAST' is the official abbreviation for +02 in the country of South Africa, +# 'CAT' is commonly used for +02 in countries north of South Africa, and +# 'WAT' is probably the best name for +01, as the common phrase for # the area that includes Nigeria is "West Africa". -# He has heard of "Western Sahara Time" for +0:00 but can find no reference. # -# To make things confusing, 'WAT' seems to have been used for -1:00 long ago; -# I'd guess that this was because people needed _some_ name for -1:00, -# and at the time, far west Africa was the only major land area in -1:00. -# This usage is now obsolete, as the last use of -1:00 on the African -# mainland seems to have been 1976 in Western Sahara. -# -# To summarize, the following abbreviations seem to have some currency: -# -1:00 WAT West Africa Time (no longer used) -# 0:00 GMT Greenwich Mean Time -# 2:00 CAT Central Africa Time -# 2:00 SAST South Africa Standard Time -# and Murray suggests the following abbreviation: -# 1:00 WAT West Africa Time -# I realize that this leads to 'WAT' being used for both -1:00 and 1:00 -# for times before 1976, but this is the best I can think of -# until we get more information. +# To summarize, the following abbreviations seemed to have some currency: +# +00 GMT Greenwich Mean Time +# +02 CAT Central Africa Time +# +02 SAST South Africa Standard Time +# and Murray suggested the following abbreviation: +# +01 WAT West Africa Time +# Murray's suggestion seems to have caught on in news reports and the like. +# I vaguely recall 'WAT' also being used for -01 in the past but +# cannot now come up with solid citations. # # I invented the following abbreviations; corrections are welcome! -# 2:00 WAST West Africa Summer Time -# 2:30 BEAT British East Africa Time (no longer used) -# 2:45 BEAUT British East Africa Unified Time (no longer used) -# 3:00 CAST Central Africa Summer Time (no longer used) -# 3:00 SAST South Africa Summer Time (no longer used) -# 3:00 EAT East Africa Time +# +02 WAST West Africa Summer Time +# +03 CAST Central Africa Summer Time (no longer used) +# +03 SAST South Africa Summer Time (no longer used) +# +03 EAT East Africa Time +# 'EAT' also seems to have caught on; the others are rare but are paired +# with better-attested non-DST abbreviations. # Algeria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -142,19 +136,19 @@ # Cameroon # See Africa/Lagos. -# Cape Verde +# Cape Verde / Cabo Verde # -# Shanks gives 1907 for the transition to CVT. +# Shanks gives 1907 for the transition to +02. # Perhaps the 1911-05-26 Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Cape_Verde -1:34:04 - LMT 1907 # Praia - -2:00 - CVT 1942 Sep - -2:00 1:00 CVST 1945 Oct 15 - -2:00 - CVT 1975 Nov 25 2:00 - -1:00 - CVT + -2:00 - -02 1942 Sep + -2:00 1:00 -01 1945 Oct 15 + -2:00 - -02 1975 Nov 25 2:00 + -1:00 - -01 # Central African Republic # See Africa/Lagos. @@ -411,7 +405,7 @@ Rule Ghana 1920 1942 - Dec 31 0:00 0 GMT # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Accra -0:00:52 - LMT 1918 - 0:00 Ghana %s + 0:00 Ghana GMT/+0020 # Guinea # See Africa/Abidjan. @@ -420,20 +414,20 @@ # # Shanks gives 1911-05-26 for the transition to WAT, # evidently confusing the date of the Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # with the date that it took effect, namely 1912-01-01. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 - -1:00 - WAT 1975 + -1:00 - -01 1975 0:00 - GMT # Kenya # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul 3:00 - EAT 1930 - 2:30 - BEAT 1940 - 2:45 - BEAUT 1960 + 2:30 - +0230 1940 + 2:45 - +0245 1960 3:00 - EAT Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia Link Africa/Nairobi Africa/Asmara # Eritrea @@ -460,7 +454,7 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Monrovia -0:43:08 - LMT 1882 -0:43:08 - MMT 1919 Mar # Monrovia Mean Time - -0:44:30 - LRT 1972 May # Liberia Time + -0:44:30 - -004430 1972 May 0:00 - GMT ############################################################################### @@ -619,7 +613,7 @@ Rule Mauritius 2009 only - Mar lastSun 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis - 4:00 Mauritius MU%sT # Mauritius Time + 4:00 Mauritius +04/+05 # Agalega Is, Rodriguez # no information; probably like Indian/Mauritius @@ -938,14 +932,14 @@ # since most of it was then controlled by Morocco. Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún - -1:00 - WAT 1976 Apr 14 + -1:00 - -01 1976 Apr 14 0:00 Morocco WE%sT # Mozambique # # Shanks gives 1903-03-01 for the transition to CAT. # Perhaps the 1911-05-26 Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -972,16 +966,19 @@ # the country are close to 40 minutes earlier in sunrise than the rest # of the country. # -# From Paul Eggert (2007-03-31): -# Apparently the Caprivi Strip informally observes Botswana time, but -# we have no details. In the meantime people there can use Africa/Gaborone. +# From Paul Eggert (2017-02-22): +# Although the Zambezi Region (formerly known as Caprivi) informally +# observes Botswana time, we have no details about historical practice. +# In the meantime people there can use Africa/Gaborone. +# See: Immanuel S. The Namibian. 2017-02-23. +# http://www.namibian.com.na/51480/read/Time-change-divides-lawmakers # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Namibia 1994 max - Sep Sun>=1 2:00 1:00 S Rule Namibia 1995 max - Apr Sun>=1 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 - 1:30 - SWAT 1903 Mar # SW Africa Time + 1:30 - +0130 1903 Mar 2:00 - SAST 1942 Sep 20 2:00 2:00 1:00 SAST 1943 Mar 21 2:00 2:00 - SAST 1990 Mar 21 # independence @@ -1008,7 +1005,7 @@ # Réunion # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis - 4:00 - RET # Réunion Time + 4:00 - +04 # # Crozet Islands also observes Réunion time; see the 'antarctica' file. # @@ -1043,7 +1040,7 @@ # Seychelles # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria - 4:00 - SCT # Seychelles Time + 4:00 - +04 # From Paul Eggert (2001-05-30): # Aldabra, Farquhar, and Desroches, originally dependencies of the # Seychelles, were transferred to the British Indian Ocean Territory
--- a/make/data/tzdata/antarctica Tue May 09 03:09:51 2017 +0100 +++ b/make/data/tzdata/antarctica Tue May 09 04:03:50 2017 +0100 @@ -133,7 +133,8 @@ # O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02 # Prat, -6230-05941 # Villa Las Estrellas (a town), around the Frei base, since 1984-04-09 -# These locations have always used Santiago time; use TZ='America/Santiago'. +# These locations employ Region of Magallanes time; use +# TZ='America/Punta_Arenas'. # China - year-round bases # Great Wall, King George Island, -6213-05858, since 1985-02-20
--- a/make/data/tzdata/asia Tue May 09 03:09:51 2017 +0100 +++ b/make/data/tzdata/asia Tue May 09 04:03:50 2017 +0100 @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2015-08-08): +# From Paul Eggert (2017-01-13): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -58,29 +58,24 @@ # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # -# I invented the abbreviations marked '*' in the following table; -# the rest are from earlier versions of this file, or from other sources. -# Corrections are welcome! +# The following alphabetic abbreviations appear in these tables: # std dst # LMT Local Mean Time # 2:00 EET EEST Eastern European Time # 2:00 IST IDT Israel -# 3:00 AST ADT Arabia* -# 3:30 IRST IRDT Iran* -# 4:00 GST Gulf* # 5:30 IST India -# 7:00 ICT Indochina, most times and locations* # 7:00 WIB west Indonesia (Waktu Indonesia Barat) # 8:00 WITA central Indonesia (Waktu Indonesia Tengah) # 8:00 CST China -# 8:00 IDT Indochina, 1943-45, 1947-55, 1960-75 (some locations)* -# 8:00 JWST Western Standard Time (Japan, 1896/1937)* -# 8:30 KST KDT Korea when at +0830* -# 9:00 JCST Central Standard Time (Japan, 1896/1937) +# 8:30 KST KDT Korea when at +0830 # 9:00 WIT east Indonesia (Waktu Indonesia Timur) # 9:00 JST JDT Japan # 9:00 KST KDT Korea when at +09 # 9:30 ACST Australian Central Standard Time +# Otherwise, these tables typically use numeric abbreviations like +03 +# and +0330 for integer hour and minute UTC offsets. Although earlier +# editions invented alphabetic time zone abbreviations for every +# offset, this did not reflect common practice. # # See the 'europe' file for Russia and Turkey in Asia. @@ -88,7 +83,7 @@ # Incorporates data for Singapore from Robert Elz' asia 1.1, as well as # additional information from Tom Yap, Sun Microsystems Intercontinental # Technical Support (including a page from the Official Airline Guide - -# Worldwide Edition). The names for time zones are guesses. +# Worldwide Edition). ############################################################################### @@ -109,8 +104,8 @@ # Afghanistan # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kabul 4:36:48 - LMT 1890 - 4:00 - AFT 1945 - 4:30 - AFT + 4:00 - +04 1945 + 4:30 - +0430 # Armenia # From Paul Eggert (2006-03-22): @@ -253,18 +248,17 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 5:53:20 - HMT 1941 Oct # Howrah Mean Time? - 6:30 - BURT 1942 May 15 # Burma Time - 5:30 - IST 1942 Sep - 6:30 - BURT 1951 Sep 30 - 6:00 - DACT 1971 Mar 26 # Dacca Time - 6:00 - BDT 2009 - 6:00 Dhaka BD%sT + 6:30 - +0630 1942 May 15 + 5:30 - +0530 1942 Sep + 6:30 - +0630 1951 Sep 30 + 6:00 - +06 2009 + 6:00 Dhaka +06/+07 # Bhutan # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimbu - 5:30 - IST 1987 Oct - 6:00 - BTT # Bhutan Time + 5:30 - +0530 1987 Oct + 6:00 - +06 # British Indian Ocean Territory # Whitman and the 1995 CIA time zone map say 5:00, but the @@ -274,14 +268,14 @@ # then contained the Chagos Archipelago). # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Chagos 4:49:40 - LMT 1907 - 5:00 - IOT 1996 # BIOT Time - 6:00 - IOT + 5:00 - +05 1996 + 6:00 - +06 # Brunei # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan - 7:30 - BNT 1933 - 8:00 - BNT + 7:30 - +0730 1933 + 8:00 - +08 # Burma / Myanmar @@ -290,9 +284,9 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Yangon 6:24:40 - LMT 1880 # or Rangoon 6:24:40 - RMT 1920 # Rangoon Mean Time? - 6:30 - BURT 1942 May # Burma Time - 9:00 - JST 1945 May 3 - 6:30 - MMT # Myanmar Time + 6:30 - +0630 1942 May + 9:00 - +09 1945 May 3 + 6:30 - +0630 # Cambodia # See Asia/Bangkok. @@ -355,7 +349,7 @@ # (could be true), for the moment I am assuming that those two # counties are mistakes in the astro.com data. -# From Paul Eggert (2014-06-30): +# From Paul Eggert (2017-01-05): # Alois Treindl kindly sent me translations of the following two sources: # # (1) @@ -413,28 +407,26 @@ # mainly observed in coastal areas), the five zones were: # # Changbai Time ("Long-white Time", Long-white = Heilongjiang area) UT +08:30 -# Asia/Harbin (currently a link to Asia/Shanghai) +# Now part of Asia/Shanghai; its pre-1970 times are not recorded here. # Heilongjiang (except Mohe county), Jilin # # Zhongyuan Time ("Central plain Time") UT +08 -# Asia/Shanghai +# Now part of Asia/Shanghai. # most of China -# This currently represents most other zones as well, -# as apparently these regions have been the same since 1970. # Milne gives 8:05:43.2 for Xujiahui Observatory time; round to nearest. # Guo says Shanghai switched to UT +08 "from the end of the 19th century". # -# Long-shu Time (probably due to Long and Shu being two names of the area) UT +07 -# Asia/Chongqing (currently a link to Asia/Shanghai) +# Long-shu Time (probably as Long and Shu were two names of the area) UT +07 +# Now part of Asia/Shanghai; its pre-1970 times are not recorded here. # Guangxi, Guizhou, Hainan, Ningxia, Sichuan, Shaanxi, and Yunnan; -# most of Gansu; west Inner Mongolia; west Qinghai; and the Guangdong +# most of Gansu; west Inner Mongolia; east Qinghai; and the Guangdong # counties Deqing, Enping, Kaiping, Luoding, Taishan, Xinxing, # Yangchun, Yangjiang, Yu'nan, and Yunfu. # # Xin-zang Time ("Xinjiang-Tibet Time") UT +06 -# Asia/Urumqi -# This currently represents Kunlun Time as well, -# as apparently the two regions have been the same since 1970. +# This region is now part of either Asia/Urumqi or Asia/Shanghai with +# current boundaries uncertain; times before 1970 for areas that +# disagree with Ürümqi or Shanghai are not recorded here. # The Gansu counties Aksay, Anxi, Dunhuang, Subei; west Qinghai; # the Guangdong counties Xuwen, Haikang, Suixi, Lianjiang, # Zhanjiang, Wuchuan, Huazhou, Gaozhou, Maoming, Dianbai, and Xinyi; @@ -445,7 +437,7 @@ # Fukang, Kuitun, Kumukuli, Miquan, Qitai, and Turfan. # # Kunlun Time UT +05:30 -# Asia/Kashgar (currently a link to Asia/Urumqi) +# This region is now in the same status as Xin-zang Time (see above). # West Tibet, including Pulan, Aheqi, Shufu, Shule; # West Xinjiang, including Aksu, Atushi, Yining, Hetian, Cele, Luopu, Nileke, # Zhaosu, Tekesi, Gongliu, Chabuchaer, Huocheng, Bole, Pishan, Suiding, @@ -546,7 +538,7 @@ # Xinjiang time, used by many in western China; represented by Ürümqi / Ürümchi # / Wulumuqi. (Please use Asia/Shanghai if you prefer Beijing time.) Zone Asia/Urumqi 5:50:20 - LMT 1928 - 6:00 - XJT + 6:00 - +06 # Hong Kong (Xianggang) @@ -765,30 +757,29 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Taipei or Taibei or T'ai-pei Zone Asia/Taipei 8:06:00 - LMT 1896 Jan 1 - 8:00 - JWST 1937 Oct 1 + 8:00 - CST 1937 Oct 1 9:00 - JST 1945 Sep 21 1:00 8:00 Taiwan C%sT # Macau (Macao, Aomen) # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Macau 1961 1962 - Mar Sun>=16 3:30 1:00 S -Rule Macau 1961 1964 - Nov Sun>=1 3:30 0 - -Rule Macau 1963 only - Mar Sun>=16 0:00 1:00 S -Rule Macau 1964 only - Mar Sun>=16 3:30 1:00 S -Rule Macau 1965 only - Mar Sun>=16 0:00 1:00 S -Rule Macau 1965 only - Oct 31 0:00 0 - -Rule Macau 1966 1971 - Apr Sun>=16 3:30 1:00 S -Rule Macau 1966 1971 - Oct Sun>=16 3:30 0 - -Rule Macau 1972 1974 - Apr Sun>=15 0:00 1:00 S -Rule Macau 1972 1973 - Oct Sun>=15 0:00 0 - -Rule Macau 1974 1977 - Oct Sun>=15 3:30 0 - -Rule Macau 1975 1977 - Apr Sun>=15 3:30 1:00 S -Rule Macau 1978 1980 - Apr Sun>=15 0:00 1:00 S -Rule Macau 1978 1980 - Oct Sun>=15 0:00 0 - +Rule Macau 1961 1962 - Mar Sun>=16 3:30 1:00 D +Rule Macau 1961 1964 - Nov Sun>=1 3:30 0 S +Rule Macau 1963 only - Mar Sun>=16 0:00 1:00 D +Rule Macau 1964 only - Mar Sun>=16 3:30 1:00 D +Rule Macau 1965 only - Mar Sun>=16 0:00 1:00 D +Rule Macau 1965 only - Oct 31 0:00 0 S +Rule Macau 1966 1971 - Apr Sun>=16 3:30 1:00 D +Rule Macau 1966 1971 - Oct Sun>=16 3:30 0 S +Rule Macau 1972 1974 - Apr Sun>=15 0:00 1:00 D +Rule Macau 1972 1973 - Oct Sun>=15 0:00 0 S +Rule Macau 1974 1977 - Oct Sun>=15 3:30 0 S +Rule Macau 1975 1977 - Apr Sun>=15 3:30 1:00 D +Rule Macau 1978 1980 - Apr Sun>=15 0:00 1:00 D +Rule Macau 1978 1980 - Oct Sun>=15 0:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Macau 7:34:20 - LMT 1912 Jan 1 - 8:00 Macau MO%sT 1999 Dec 20 # return to China - 8:00 PRC C%sT + 8:00 Macau C%sT ############################################################################### @@ -904,11 +895,10 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 - 8:00 - TLT 1942 Feb 21 23:00 # E Timor Time - 9:00 - JST 1945 Sep 23 - 9:00 - TLT 1976 May 3 - 8:00 - WITA 2000 Sep 17 0:00 - 9:00 - TLT + 8:00 - +08 1942 Feb 21 23:00 + 9:00 - +09 1976 May 3 + 8:00 - +08 2000 Sep 17 0:00 + 9:00 - +09 # India @@ -923,9 +913,9 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kolkata 5:53:28 - LMT 1880 # Kolkata 5:53:20 - HMT 1941 Oct # Howrah Mean Time? - 6:30 - BURT 1942 May 15 # Burma Time + 6:30 - +0630 1942 May 15 5:30 - IST 1942 Sep - 5:30 1:00 IST 1945 Oct 15 + 5:30 1:00 +0630 1945 Oct 15 5:30 - IST # The following are like Asia/Kolkata: # Andaman Is @@ -976,33 +966,33 @@ # Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13, # but this must be a typo. 7:07:12 - BMT 1923 Dec 31 23:47:12 # Batavia - 7:20 - JAVT 1932 Nov # Java Time - 7:30 - WIB 1942 Mar 23 - 9:00 - JST 1945 Sep 23 - 7:30 - WIB 1948 May - 8:00 - WIB 1950 May - 7:30 - WIB 1964 + 7:20 - +0720 1932 Nov + 7:30 - +0730 1942 Mar 23 + 9:00 - +09 1945 Sep 23 + 7:30 - +0730 1948 May + 8:00 - +08 1950 May + 7:30 - +0730 1964 7:00 - WIB # west and central Borneo Zone Asia/Pontianak 7:17:20 - LMT 1908 May 7:17:20 - PMT 1932 Nov # Pontianak MT - 7:30 - WIB 1942 Jan 29 - 9:00 - JST 1945 Sep 23 - 7:30 - WIB 1948 May - 8:00 - WIB 1950 May - 7:30 - WIB 1964 + 7:30 - +0730 1942 Jan 29 + 9:00 - +09 1945 Sep 23 + 7:30 - +0730 1948 May + 8:00 - +08 1950 May + 7:30 - +0730 1964 8:00 - WITA 1988 Jan 1 7:00 - WIB # Sulawesi, Lesser Sundas, east and south Borneo Zone Asia/Makassar 7:57:36 - LMT 1920 7:57:36 - MMT 1932 Nov # Macassar MT - 8:00 - WITA 1942 Feb 9 - 9:00 - JST 1945 Sep 23 + 8:00 - +08 1942 Feb 9 + 9:00 - +09 1945 Sep 23 8:00 - WITA # Maluku Islands, West Papua, Papua Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov - 9:00 - WIT 1944 Sep 1 - 9:30 - ACST 1964 + 9:00 - +09 1944 Sep 1 + 9:30 - +0930 1964 9:00 - WIT # Iran @@ -1034,8 +1024,6 @@ # for at least the last 5 years. Before that, for a few years, the # date used was the first Thursday night of Farvardin and the last # Thursday night of Shahrivar, but I can't give exact dates.... -# I have also changed the abbreviations to what is considered correct -# here in Iran, IRST for regular time and IRDT for daylight saving time. # # From Roozbeh Pournader (2005-04-05): # The text of the Iranian law, in effect since 1925, clearly mentions @@ -1142,9 +1130,9 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Tehran 3:25:44 - LMT 1916 3:25:44 - TMT 1946 # Tehran Mean Time - 3:30 - IRST 1977 Nov - 4:00 Iran IR%sT 1979 - 3:30 Iran IR%sT + 3:30 - +0330 1977 Nov + 4:00 Iran +04/+05 1979 + 3:30 Iran +0330/+0430 # Iraq @@ -1187,8 +1175,8 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Baghdad 2:57:40 - LMT 1890 2:57:36 - BMT 1918 # Baghdad Mean Time? - 3:00 - AST 1982 May - 3:00 Iraq A%sT + 3:00 - +03 1982 May + 3:00 Iraq +03/+04 ############################################################################### @@ -1487,8 +1475,6 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u - 9:00 - JST 1896 Jan 1 - 9:00 - JCST 1937 Oct 1 9:00 Japan J%sT # Since 1938, all Japanese possessions have been like Asia/Tokyo. @@ -1606,12 +1592,12 @@ # was "blended" with the Central zone. Therefore, Kazakhstan now has # two time zones, and difference between them is one hour. The zone # closer to UTC is the former Western zone (probably still called the -# same), encompassing four provinces in the west: Aqtobe, Atyrau, -# Mangghystau, and West Kazakhstan. The other zone encompasses +# same), encompassing four provinces in the west: Aqtöbe, Atyraū, +# Mangghystaū, and West Kazakhstan. The other zone encompasses # everything else.... I guess that would make Kazakhstan time zones # de jure UTC+5 and UTC+6 respectively. -# From Stepan Golosunov (2016-03-27) ([*] means see later comments below): +# From Stepan Golosunov (2016-03-27): # Review of the linked documents from http://adilet.zan.kz/ # produced the following data for post-1991 Kazakhstan: # @@ -1657,7 +1643,7 @@ # # This implies that on 1991-03-31 Asia/Oral remained on +04/+05 while # the rest of Kazakhstan switched from +06/+07 to +05/06 or from +05/06 -# to +04/+05. It's unclear how Kzyl-Orda oblast moved into the fifth +# to +04/+05. It's unclear how Qyzylorda oblast moved into the fifth # time belt. (By switching from +04/+05 to +05/+06 on 1991-09-29?) ... # # 1. Act of the Cabinet of Ministers of the Republic of Kazakhstan @@ -1670,25 +1656,25 @@ # on the whole territory of Kazakhstan 1 hour forward on 1992-01-19 at # 2:00, specified DST rules. It acknowledged that Kazakhstan was # located in the fourth and the fifth time belts and specified the -# border between them to be located east of Kustanay and Aktyubinsk -# oblasts (notably including Turgai and Kzyl-Orda oblasts into the fifth +# border between them to be located east of Qostanay and Aktyubinsk +# oblasts (notably including Turgai and Qyzylorda oblasts into the fifth # time belt). # # This means switch on 1992-01-19 at 2:00 from +04/+05 to +05/+06 for -# Asia/Aqtau, Asia/Aqtobe, Asia/Oral, Atyrau and Kustanay oblasts; from -# +05/+06 to +06/+07 for Asia/Almaty and Asia/Qyzylorda (and Arkalyk) [*].... +# Asia/Aqtau, Asia/Aqtobe, Asia/Oral, Atyraū and Qostanay oblasts; from +# +05/+06 to +06/+07 for Asia/Almaty and Asia/Qyzylorda (and Arkalyk).... # # 2. Act of the Cabinet of Ministers of the Republic of Kazakhstan # from 1992-03-27 No. 284 # http://adilet.zan.kz/rus/docs/P920000284_ -# cancels extra hour ("decree time") for Uralsk and Kzyl-Orda oblasts +# cancels extra hour ("decree time") for Uralsk and Qyzylorda oblasts # since the last Sunday of March 1992, while keeping them in the fourth # and the fifth time belts respectively. # # 3. Order of the Prime Minister of the Republic of Kazakhstan # from 1994-09-23 No. 384 # http://adilet.zan.kz/rus/docs/R940000384_ -# cancels the extra hour ("decree time") on the territory of Mangystau +# cancels the extra hour ("decree time") on the territory of Mangghystaū # oblast since the last Sunday of September 1994 (saying that time on # the territory would correspond to the third time belt as a # result).... @@ -1702,14 +1688,11 @@ # 5. Act of the Government of the Republic of Kazakhstan # from 1999-03-26 No. 305 # http://adilet.zan.kz/rus/docs/P990000305_ -# cancels the extra hour ("decree time") for Atyrau oblast since the +# cancels the extra hour ("decree time") for Atyraū oblast since the # last Sunday of March 1999 while retaining the oblast in the fourth # time belt. # -# This means change from +05/+06 to +04/+05. -# -# There is no zone for Atyrau currently (listed under Asia/Aqtau in -# zone1970.tab).[*] +# This means change from +05/+06 to +04/+05.... # # 6. Act of the Government of the Republic of Kazakhstan # from 2000-11-23 No. 1749 @@ -1719,10 +1702,10 @@ # The only changes I noticed are in definition of the border between the # fourth and the fifth time belts. They account for changes in spelling # and administrative division (splitting of Turgai oblast in 1997 -# probably changed time in territories incorporated into Kostanay oblast -# (including Arkalyk) from +06/+07 to +05/+06) and move Kyzylorda oblast +# probably changed time in territories incorporated into Qostanay oblast +# (including Arkalyk) from +06/+07 to +05/+06) and move Qyzylorda oblast # from being in the fifth time belt and not using decree time into the -# fourth time belt (no change in practice).[*] +# fourth time belt (no change in practice). # # 7. Act of the Government of the Republic of Kazakhstan # from 2003-12-29 No. 1342 @@ -1732,7 +1715,7 @@ # 8. Act of the Government of the Republic of Kazakhstan # from 2004-07-20 No. 775 # http://adilet.zan.kz/rus/archive/docs/P040000775_/20.07.2004 -# modified the 2000-11-23 act to move Kostanay and Kyzylorda oblasts into +# modified the 2000-11-23 act to move Qostanay and Qyzylorda oblasts into # the fifth time belt and add Aktobe oblast to the list of regions not # using extra hour ("decree time"), leaving Kazakhstan with only 2 time # zones (+04/+05 and +06/+07). The changes were to be implemented @@ -1744,14 +1727,14 @@ # http://adilet.zan.kz/rus/docs/P040001059_ # modified the 2000-11-23 act to remove exceptions from the "decree time" # (leaving Kazakhstan in +05/+06 and +06/+07 zones), amended the -# 2004-07-20 act to implement changes for Atyrau, West Kazakhstan, -# Kostanay, Kyzylorda and Mangystau oblasts by not moving clocks -# during the 2014 transition to "winter" time. +# 2004-07-20 act to implement changes for Atyraū, West Kazakhstan, +# Qostanay, Qyzylorda and Mangghystaū oblasts by not moving clocks +# during the 2004 transition to "winter" time. # -# This means transition from +04/+05 to +05/+06 for Atyrau oblast (no +# This means transition from +04/+05 to +05/+06 for Atyraū oblast (no # zone currently), Asia/Oral, Asia/Aqtau and transition from +05/+06 to -# +06/+07 for Kostanay oblast (Kostanay and Arkalyk, no zones currently) -# and Asia/Qyzylorda on 2004-10-31 at 3:00....[*] +# +06/+07 for Qostanay oblast (Qostanay and Arkalyk, no zones currently) +# and Asia/Qyzylorda on 2004-10-31 at 3:00.... # # 10. Act of the Government of the Republic of Kazakhstan # from 2005-03-15 No. 231 @@ -1767,14 +1750,25 @@ # Kazakh 1992-01-13 act appears to provide the same rules and 1992-03-27 # act was to be enacted on the last Sunday of March 1992. -# From Paul Eggert (2016-04-15): -# The tables below should reflect Stepan Golosunov's remarks above, -# except for the items marked "[*]" which I haven't gotten to yet. -# It looks like we will need new zones Asia/Atyrau and Asia/Qostanay -# to handle changes from 1992 through 2004 that we did not previously -# know about. +# From Stepan Golosunov (2016-11-08): +# Turgai reorganization should affect only southern part of Qostanay +# oblast. Which should probably be separated into Asia/Arkalyk zone. +# (There were also 1970, 1988 and 1990 Turgai oblast reorganizations +# according to wikipedia.) +# +# [For Qostanay] http://www.ng.kz/gazeta/195/hranit/ +# suggests that clocks were to be moved 40 minutes backwards on +# 1920-01-01 to the fourth time belt. But I do not understand +# how that could happen.... +# +# [For Atyrau and Oral] 1919 decree +# (http://www.worldtimezone.com/dst_news/dst_news_russia-1919-02-08.html +# and in Byalokoz) lists Ural river (plus 10 versts on its left bank) in +# the third time belt (before 1930 this means +03). -# +# From Paul Eggert (2016-12-06): +# The tables below reflect Golosunov's remarks, with exceptions as noted. + # Zone NAME GMTOFF RULES FORMAT [UNTIL] # # Almaty (formerly Alma-Ata), representing most locations in Kazakhstan @@ -1787,6 +1781,8 @@ 6:00 RussiaAsia +06/+07 2004 Oct 31 2:00s 6:00 - +06 # Qyzylorda (aka Kyzylorda, Kizilorda, Kzyl-Orda, etc.) (KZ-KZY) +# This currently includes Qostanay (aka Kostanay, Kustanay) (KZ-KUS); +# see comments below. Zone Asia/Qyzylorda 4:21:52 - LMT 1924 May 2 4:00 - +04 1930 Jun 21 5:00 - +05 1981 Apr 1 @@ -1798,7 +1794,21 @@ 6:00 RussiaAsia +06/+07 1992 Mar 29 2:00s 5:00 RussiaAsia +05/+06 2004 Oct 31 2:00s 6:00 - +06 -# Aqtobe (aka Aktobe, formerly Aktyubinsk) (KZ-AKT) +# The following zone is like Asia/Qyzylorda except for being one +# hour earlier from 1991-09-29 to 1992-03-29. The 1991/2 rules for +# Qostanay are unclear partly because of the 1997 Turgai +# reorganization, so this zone is commented out for now. +#Zone Asia/Qostanay 4:14:20 - LMT 1924 May 2 +# 4:00 - +04 1930 Jun 21 +# 5:00 - +05 1981 Apr 1 +# 5:00 1:00 +06 1981 Oct 1 +# 6:00 - +06 1982 Apr 1 +# 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s +# 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s +# 5:00 RussiaAsia +05/+06 2004 Oct 31 2:00s +# 6:00 - +06 +# +# Aqtöbe (aka Aktobe, formerly Aktyubinsk) (KZ-AKT) Zone Asia/Aqtobe 3:48:40 - LMT 1924 May 2 4:00 - +04 1930 Jun 21 5:00 - +05 1981 Apr 1 @@ -1808,14 +1818,11 @@ 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s 5:00 RussiaAsia +05/+06 2004 Oct 31 2:00s 5:00 - +05 -# Qostanay (KZ-KUS) - -# Mangghystau (KZ-MAN) +# Mangghystaū (KZ-MAN) # Aqtau was not founded until 1963, but it represents an inhabited region, # so include time stamps before 1963. Zone Asia/Aqtau 3:21:04 - LMT 1924 May 2 4:00 - +04 1930 Jun 21 - 5:00 - +05 1963 5:00 - +05 1981 Oct 1 6:00 - +06 1982 Apr 1 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s @@ -1823,12 +1830,22 @@ 5:00 RussiaAsia +05/+06 1994 Sep 25 2:00s 4:00 RussiaAsia +04/+05 2004 Oct 31 2:00s 5:00 - +05 - +# Atyraū (KZ-ATY) is like Mangghystaū except it switched from +# +04/+05 to +05/+06 in spring 1999, not fall 1994. +Zone Asia/Atyrau 3:27:44 - LMT 1924 May 2 + 3:00 - +03 1930 Jun 21 + 5:00 - +05 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s + 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s + 5:00 RussiaAsia +05/+06 1999 Mar 28 2:00s + 4:00 RussiaAsia +04/+05 2004 Oct 31 2:00s + 5:00 - +05 # West Kazakhstan (KZ-ZAP) # From Paul Eggert (2016-03-18): # The 1989 transition is from USSR act No. 227 (1989-03-14). Zone Asia/Oral 3:25:24 - LMT 1924 May 2 # or Ural'sk - 4:00 - +04 1930 Jun 21 + 3:00 - +03 1930 Jun 21 5:00 - +05 1981 Apr 1 5:00 1:00 +06 1981 Oct 1 6:00 - +06 1982 Apr 1 @@ -1934,14 +1951,12 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1 8:30 - KST 1912 Jan 1 - 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Sep 8 9:00 - KST 1954 Mar 21 8:30 ROK K%sT 1961 Aug 10 9:00 ROK K%sT 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 00:00 8:30 - KST @@ -1996,30 +2011,29 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kuala_Lumpur 6:46:46 - LMT 1901 Jan 1 6:55:25 - SMT 1905 Jun 1 # Singapore M.T. - 7:00 - MALT 1933 Jan 1 # Malaya Time - 7:00 0:20 MALST 1936 Jan 1 - 7:20 - MALT 1941 Sep 1 - 7:30 - MALT 1942 Feb 16 - 9:00 - JST 1945 Sep 12 - 7:30 - MALT 1982 Jan 1 - 8:00 - MYT # Malaysia Time + 7:00 - +07 1933 Jan 1 + 7:00 0:20 +0720 1936 Jan 1 + 7:20 - +0720 1941 Sep 1 + 7:30 - +0730 1942 Feb 16 + 9:00 - +09 1945 Sep 12 + 7:30 - +0730 1982 Jan 1 + 8:00 - +08 # Sabah & Sarawak # From Paul Eggert (2014-08-12): # The data entries here are mostly from Shanks & Pottenger, but the 1942, 1945 # and 1982 transition dates are from Mok Ly Yng. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kuching 7:21:20 - LMT 1926 Mar - 7:30 - BORT 1933 # Borneo Time - 8:00 NBorneo BOR%sT 1942 Feb 16 - 9:00 - JST 1945 Sep 12 - 8:00 - BORT 1982 Jan 1 - 8:00 - MYT + 7:30 - +0730 1933 + 8:00 NBorneo +08/+0820 1942 Feb 16 + 9:00 - +09 1945 Sep 12 + 8:00 - +08 # Maldives # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Maldives 4:54:00 - LMT 1880 # Male 4:54:00 - MMT 1960 # Male Mean Time - 5:00 - MVT # Maldives Time + 5:00 - +05 # Mongolia @@ -2146,37 +2160,41 @@ # correction of 02:00 (in the previous edition) not being done correctly # in the latest edition; so ignore it for now. +# From Ganbold Tsagaankhuu (2017-02-09): +# Mongolian Government meeting has concluded today to cancel daylight +# saving time adoption in Mongolia. Source: http://zasag.mn/news/view/16192 + Rule Mongol 1985 1998 - Mar lastSun 0:00 1:00 S Rule Mongol 1984 1998 - Sep lastSun 0:00 0 - # IATA SSIM (1999-09) says Mongolia no longer observes DST. Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S Rule Mongol 2001 2006 - Sep lastSat 2:00 0 - Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S -Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S -Rule Mongol 2015 max - Sep lastSat 0:00 0 - +Rule Mongol 2015 2016 - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 2016 - Sep lastSat 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta Zone Asia/Hovd 6:06:36 - LMT 1905 Aug - 6:00 - HOVT 1978 # Hovd Time - 7:00 Mongol HOV%sT + 6:00 - +06 1978 + 7:00 Mongol +07/+08 # Ulaanbaatar, a.k.a. Ulan Bataar, Ulan Bator, Urga Zone Asia/Ulaanbaatar 7:07:32 - LMT 1905 Aug - 7:00 - ULAT 1978 # Ulaanbaatar Time - 8:00 Mongol ULA%sT + 7:00 - +07 1978 + 8:00 Mongol +08/+09 # Choibalsan, a.k.a. Bajan Tümen, Bajan Tumen, Chojbalsan, # Choybalsan, Sanbejse, Tchoibalsan Zone Asia/Choibalsan 7:38:00 - LMT 1905 Aug - 7:00 - ULAT 1978 - 8:00 - ULAT 1983 Apr - 9:00 Mongol CHO%sT 2008 Mar 31 # Choibalsan Time - 8:00 Mongol CHO%sT + 7:00 - +07 1978 + 8:00 - +08 1983 Apr + 9:00 Mongol +09/+10 2008 Mar 31 + 8:00 Mongol +08/+09 # Nepal # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kathmandu 5:41:16 - LMT 1920 - 5:30 - IST 1986 - 5:45 - NPT # Nepal Time + 5:30 - +0530 1986 + 5:45 - +0545 # Oman # See Asia/Dubai. @@ -2325,10 +2343,10 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Karachi 4:28:12 - LMT 1907 - 5:30 - IST 1942 Sep - 5:30 1:00 IST 1945 Oct 15 - 5:30 - IST 1951 Sep 30 - 5:00 - KART 1971 Mar 26 # Karachi Time + 5:30 - +0530 1942 Sep + 5:30 1:00 +0630 1945 Oct 15 + 5:30 - +0530 1951 Sep 30 + 5:00 - +05 1971 Mar 26 5:00 Pakistan PK%sT # Pakistan Time # Palestine @@ -2639,7 +2657,7 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct - 2:00 Zion EET 1948 May 15 + 2:00 Zion EET/EEST 1948 May 15 2:00 EgyptAsia EE%sT 1967 Jun 5 2:00 Zion I%sT 1996 2:00 Jordan EE%sT 1999 @@ -2652,7 +2670,7 @@ 2:00 Palestine EE%sT Zone Asia/Hebron 2:20:23 - LMT 1900 Oct - 2:00 Zion EET 1948 May 15 + 2:00 Zion EET/EEST 1948 May 15 2:00 EgyptAsia EE%sT 1967 Jun 5 2:00 Zion I%sT 1996 2:00 Jordan EE%sT 1999 @@ -2693,15 +2711,15 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Manila -15:56:00 - LMT 1844 Dec 31 8:04:00 - LMT 1899 May 11 - 8:00 Phil PH%sT 1942 May - 9:00 - JST 1944 Nov - 8:00 Phil PH%sT + 8:00 Phil +08/+09 1942 May + 9:00 - +09 1944 Nov + 8:00 Phil +08/+09 # Qatar # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha - 4:00 - GST 1972 Jun - 3:00 - AST + 4:00 - +04 1972 Jun + 3:00 - +03 Link Asia/Qatar Asia/Bahrain # Saudi Arabia @@ -2728,7 +2746,7 @@ # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14 - 3:00 - AST + 3:00 - +03 Link Asia/Riyadh Asia/Aden # Yemen Link Asia/Riyadh Asia/Kuwait @@ -2738,14 +2756,13 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Singapore 6:55:25 - LMT 1901 Jan 1 6:55:25 - SMT 1905 Jun 1 # Singapore M.T. - 7:00 - MALT 1933 Jan 1 # Malaya Time - 7:00 0:20 MALST 1936 Jan 1 - 7:20 - MALT 1941 Sep 1 - 7:30 - MALT 1942 Feb 16 - 9:00 - JST 1945 Sep 12 - 7:30 - MALT 1965 Aug 9 # independence - 7:30 - SGT 1982 Jan 1 # Singapore Time - 8:00 - SGT + 7:00 - +07 1933 Jan 1 + 7:00 0:20 +0720 1936 Jan 1 + 7:20 - +0720 1941 Sep 1 + 7:30 - +0730 1942 Feb 16 + 9:00 - +09 1945 Sep 12 + 7:30 - +0730 1982 Jan 1 + 8:00 - +08 # Spratly Is # no information @@ -2804,8 +2821,8 @@ Zone Asia/Colombo 5:19:24 - LMT 1880 5:19:32 - MMT 1906 # Moratuwa Mean Time 5:30 - +0530 1942 Jan 5 - 5:30 0:30 +0530/+06 1942 Sep - 5:30 1:00 +0530/+0630 1945 Oct 16 2:00 + 5:30 0:30 +06 1942 Sep + 5:30 1:00 +0630 1945 Oct 16 2:00 5:30 - +0530 1996 May 25 0:00 6:30 - +0630 1996 Oct 26 0:30 6:00 - +06 2006 Apr 15 0:30 @@ -2987,7 +3004,7 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Bangkok 6:42:04 - LMT 1880 6:42:04 - BMT 1920 Apr # Bangkok Mean Time - 7:00 - ICT + 7:00 - +07 Link Asia/Bangkok Asia/Phnom_Penh # Cambodia Link Asia/Bangkok Asia/Vientiane # Laos @@ -3003,7 +3020,7 @@ # United Arab Emirates # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dubai 3:41:12 - LMT 1920 - 4:00 - GST + 4:00 - +04 Link Asia/Dubai Asia/Muscat # Oman # Uzbekistan @@ -3076,15 +3093,15 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jul 1 - 7:06:30 - PLMT 1911 May 1 - 7:00 - ICT 1942 Dec 31 23:00 - 8:00 - IDT 1945 Mar 14 23:00 - 9:00 - JST 1945 Sep 2 - 7:00 - ICT 1947 Apr 1 - 8:00 - IDT 1955 Jul 1 - 7:00 - ICT 1959 Dec 31 23:00 - 8:00 - IDT 1975 Jun 13 - 7:00 - ICT + 7:06:30 - PLMT 1911 May 1 # Phù Liễn MT + 7:00 - +07 1942 Dec 31 23:00 + 8:00 - +08 1945 Mar 14 23:00 + 9:00 - +09 1945 Sep 2 + 7:00 - +07 1947 Apr 1 + 8:00 - +08 1955 Jul 1 + 7:00 - +07 1959 Dec 31 23:00 + 8:00 - +08 1975 Jun 13 + 7:00 - +07 # Yemen # See Asia/Riyadh.
--- a/make/data/tzdata/australasia Tue May 09 03:09:51 2017 +0100 +++ b/make/data/tzdata/australasia Tue May 09 04:03:50 2017 +0100 @@ -67,8 +67,8 @@ 8:00 Aus AW%sT 1943 Jul 8:00 AW AW%sT Zone Australia/Eucla 8:35:28 - LMT 1895 Dec - 8:45 Aus ACW%sT 1943 Jul - 8:45 AW ACW%sT + 8:45 Aus +0845/+0945 1943 Jul + 8:45 AW +0845/+0945 # Queensland # @@ -235,7 +235,8 @@ Rule LH 2008 max - Oct Sun>=1 2:00 0:30 D Zone Australia/Lord_Howe 10:36:20 - LMT 1895 Feb 10:00 - AEST 1981 Mar - 10:30 LH LH%sT + 10:30 LH +1030/+1130 1985 Jul + 10:30 LH +1030/+11 # Australian miscellany # @@ -273,19 +274,19 @@ 0 - -00 1948 Mar 25 10:00 Aus AE%sT 1967 10:00 AT AE%sT 2010 Apr 4 3:00 - 11:00 - MIST # Macquarie I Standard Time + 11:00 - +11 # Christmas # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Christmas 7:02:52 - LMT 1895 Feb - 7:00 - CXT # Christmas Island Time + 7:00 - +07 # Cocos (Keeling) Is # These islands were ruled by the Ross family from about 1830 to 1978. # We don't know when standard time was introduced; for now, we guess 1900. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Cocos 6:27:40 - LMT 1900 - 6:30 - CCT # Cocos Islands Time + 6:30 - +0630 # Fiji @@ -398,16 +399,16 @@ 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 + 12:00 Fiji +12/+13 # French Polynesia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Gambier -8:59:48 - LMT 1912 Oct # Rikitea - -9:00 - GAMT # Gambier Time + -9:00 - -09 Zone Pacific/Marquesas -9:18:00 - LMT 1912 Oct - -9:30 - MART # Marquesas Time + -9:30 - -0930 Zone Pacific/Tahiti -9:58:16 - LMT 1912 Oct # Papeete - -10:00 - TAHT # Tahiti Time + -10:00 - -10 # Clipperton (near North America) is administered from French Polynesia; # it is uninhabited. @@ -422,15 +423,15 @@ # Kiribati # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Tarawa 11:32:04 - LMT 1901 # Bairiki - 12:00 - GILT # Gilbert Is Time + 12:00 - +12 Zone Pacific/Enderbury -11:24:20 - LMT 1901 - -12:00 - PHOT 1979 Oct # Phoenix Is Time - -11:00 - PHOT 1995 - 13:00 - PHOT + -12:00 - -12 1979 Oct + -11:00 - -11 1995 + 13:00 - +13 Zone Pacific/Kiritimati -10:29:20 - LMT 1901 - -10:40 - LINT 1979 Oct # Line Is Time - -10:00 - LINT 1995 - 14:00 - LINT + -10:40 - -1040 1979 Oct + -10:00 - -10 1995 + 14:00 - +14 # N Mariana Is # See Pacific/Guam. @@ -438,31 +439,31 @@ # Marshall Is # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Majuro 11:24:48 - LMT 1901 - 11:00 - MHT 1969 Oct # Marshall Islands Time - 12:00 - MHT + 11:00 - +11 1969 Oct + 12:00 - +12 Zone Pacific/Kwajalein 11:09:20 - LMT 1901 - 11:00 - MHT 1969 Oct - -12:00 - KWAT 1993 Aug 20 # Kwajalein Time - 12:00 - MHT + 11:00 - +11 1969 Oct + -12:00 - -12 1993 Aug 20 + 12:00 - +12 # Micronesia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Chuuk 10:07:08 - LMT 1901 - 10:00 - CHUT # Chuuk Time + 10:00 - +10 Zone Pacific/Pohnpei 10:32:52 - LMT 1901 # Kolonia - 11:00 - PONT # Pohnpei Time + 11:00 - +11 Zone Pacific/Kosrae 10:51:56 - LMT 1901 - 11:00 - KOST 1969 Oct # Kosrae Time - 12:00 - KOST 1999 - 11:00 - KOST + 11:00 - +11 1969 Oct + 12:00 - +12 1999 + 11:00 - +11 # Nauru # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Nauru 11:07:40 - LMT 1921 Jan 15 # Uaobe - 11:30 - NRT 1942 Mar 15 # Nauru Time - 9:00 - JST 1944 Aug 15 - 11:30 - NRT 1979 May - 12:00 - NRT + 11:30 - +1130 1942 Mar 15 + 9:00 - +09 1944 Aug 15 + 11:30 - +1130 1979 May + 12:00 - +12 # New Caledonia # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -473,7 +474,7 @@ Rule NC 1997 only - Mar 2 2:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Noumea 11:05:48 - LMT 1912 Jan 13 # Nouméa - 11:00 NC NC%sT + 11:00 NC +11/+12 ############################################################################### @@ -514,8 +515,8 @@ 11:30 NZ NZ%sT 1946 Jan 1 12:00 NZ NZ%sT Zone Pacific/Chatham 12:13:48 - LMT 1868 Nov 2 - 12:15 - CHAST 1946 Jan 1 - 12:45 Chatham CHA%sT + 12:15 - +1215 1946 Jan 1 + 12:45 Chatham +1245/+1345 Link Pacific/Auckland Antarctica/McMurdo @@ -537,8 +538,8 @@ Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua - -10:30 - CKT 1978 Nov 12 # Cook Is Time - -10:00 Cook CK%sT + -10:30 - -1030 1978 Nov 12 + -10:00 Cook -10/-0930 ############################################################################### @@ -546,29 +547,29 @@ # Niue # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Niue -11:19:40 - LMT 1901 # Alofi - -11:20 - NUT 1951 # Niue Time - -11:30 - NUT 1978 Oct 1 - -11:00 - NUT + -11:20 - -1120 1951 + -11:30 - -1130 1978 Oct 1 + -11:00 - -11 # Norfolk # 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 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 + 11:12 - +1112 1951 + 11:30 - +1130 1974 Oct 27 02:00 + 11:30 1:00 +1230 1975 Mar 2 02:00 + 11:30 - +1130 2015 Oct 4 02:00 + 11:00 - +11 # Palau (Belau) # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Palau 8:57:56 - LMT 1901 # Koror - 9:00 - PWT # Palau Time + 9:00 - +09 # Papua New Guinea # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Port_Moresby 9:48:40 - LMT 1880 9:48:32 - PMMT 1895 # Port Moresby Mean Time - 10:00 - PGT # Papua New Guinea Time + 10:00 - +10 # # From Paul Eggert (2014-10-13): # Base the Bougainville entry on the Arawa-Kieta region, which appears to have @@ -583,28 +584,26 @@ # and seem to have controlled it until their 1945-08-21 surrender. # # The Autonomous Region of Bougainville switched from UT +10 to +11 -# on 2014-12-28 at 02:00. They call +11 "Bougainville Standard Time"; -# abbreviate this as BST. See: +# on 2014-12-28 at 02:00. They call +11 "Bougainville Standard Time". +# See: # http://www.bougainville24.com/bougainville-issues/bougainville-gets-own-timezone/ # Zone Pacific/Bougainville 10:22:16 - LMT 1880 9:48:32 - PMMT 1895 - 10:00 - PGT 1942 Jul - 9:00 - JST 1945 Aug 21 - 10:00 - PGT 2014 Dec 28 2:00 - 11:00 - BST + 10:00 - +10 1942 Jul + 9:00 - +09 1945 Aug 21 + 10:00 - +10 2014 Dec 28 2:00 + 11:00 - +11 # Pitcairn # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Pitcairn -8:40:20 - LMT 1901 # Adamstown - -8:30 - PNT 1998 Apr 27 0:00 - -8:00 - PST # Pitcairn Standard Time + -8:30 - -0830 1998 Apr 27 0:00 + -8:00 - -08 # American Samoa Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5 -11:22:48 - LMT 1911 - -11:00 - NST 1967 Apr # N=Nome - -11:00 - BST 1983 Nov 30 # B=Bering -11:00 - SST # S=Samoa Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands @@ -685,17 +684,17 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 -11:26:56 - LMT 1911 - -11:30 - WSST 1950 - -11:00 WS S%sT 2011 Dec 29 24:00 # S=Samoa - 13:00 WS WS%sT + -11:30 - -1130 1950 + -11:00 WS -11/-10 2011 Dec 29 24:00 + 13:00 WS +13/+14 # Solomon Is # excludes Bougainville, for which see Papua New Guinea # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Honiara - 11:00 - SBT # Solomon Is Time + 11:00 - +11 -# Tokelau Is +# Tokelau # # From Gwillim Law (2011-12-29) # A correspondent informed me that Tokelau, like Samoa, will be skipping @@ -716,8 +715,8 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Fakaofo -11:24:56 - LMT 1901 - -11:00 - TKT 2011 Dec 30 # Tokelau Time - 13:00 - TKT + -11:00 - -11 2011 Dec 30 + 13:00 - +13 # Tonga # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -736,7 +735,7 @@ # Tuvalu # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Funafuti 11:56:52 - LMT 1901 - 12:00 - TVT # Tuvalu Time + 12:00 - +12 # US minor outlying islands @@ -760,10 +759,11 @@ # Johnston # -# From Paul Eggert (2014-03-11): +# From Paul Eggert (2017-02-10): # Sometimes Johnston kept Hawaii time, and sometimes it was an hour behind. # Details are uncertain. We have no data for Johnston after 1970, so -# treat it like Hawaii for now. +# treat it like Hawaii for now. Since Johnston is now uninhabited, +# its link to Pacific/Honolulu is in the 'backward' file. # # In his memoirs of June 6th to October 4, 1945 # <http://www.315bw.org/Herb_Bach.htm> (2005), Herbert C. Bach writes, @@ -783,8 +783,6 @@ # See the table on page 4 where he lists GMT and local times for the tests; a # footnote for the JI tests reads that local time is "JI time = Hawaii Time # Minus One Hour". -# -# See 'northamerica' for Pacific/Johnston. # Kingman # uninhabited @@ -798,7 +796,7 @@ # Wake # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Wake 11:06:28 - LMT 1901 - 12:00 - WAKT # Wake Time + 12:00 - +12 # Vanuatu @@ -811,12 +809,12 @@ Rule Vanuatu 1992 only - Oct Sun>=23 0:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila - 11:00 Vanuatu VU%sT # Vanuatu Time + 11:00 Vanuatu +11/+12 # Wallis and Futuna # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Wallis 12:15:20 - LMT 1901 - 12:00 - WFT # Wallis & Futuna Time + 12:00 - +12 ############################################################################### @@ -827,15 +825,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-10): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -852,28 +850,19 @@ # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # -# I invented the abbreviations marked '*' in the following table; -# the rest are from earlier versions of this file, or from other sources. +# The following abbreviations are from other sources. # Corrections are welcome! # std dst # LMT Local Mean Time # 8:00 AWST AWDT Western Australia -# 8:45 ACWST ACWDT Central Western Australia* -# 9:00 JST Japan # 9:30 ACST ACDT Central Australia # 10:00 AEST AEDT Eastern Australia +# 10:00 GST Guam through 2000 # 10:00 ChST Chamorro -# 10:30 LHST LHDT Lord Howe* -# 11:00 BST Bougainville* # 11:30 NZMT NZST New Zealand through 1945 # 12:00 NZST NZDT New Zealand 1946-present -# 12:15 CHAST Chatham through 1945* -# 12:45 CHAST CHADT Chatham 1946-present* -# 13:00 WSST WSDT (western) Samoa 2011-present* -# -11:30 WSST Western Samoa through 1950* # -11:00 SST Samoa # -10:00 HST Hawaii -# - 8:00 PST Pitcairn* # # See the 'northamerica' file for Hawaii. # See the 'southamerica' file for Easter I and the Galápagos Is.
--- a/make/data/tzdata/backward Tue May 09 03:09:51 2017 +0100 +++ b/make/data/tzdata/backward Tue May 09 04:03:50 2017 +0100 @@ -119,6 +119,7 @@ Link Pacific/Chatham NZ-CHAT Link America/Denver Navajo Link Asia/Shanghai PRC +Link Pacific/Honolulu Pacific/Johnston Link Pacific/Pohnpei Pacific/Ponape Link Pacific/Pago_Pago Pacific/Samoa Link Pacific/Chuuk Pacific/Truk
--- a/make/data/tzdata/europe Tue May 09 03:09:51 2017 +0100 +++ b/make/data/tzdata/europe Tue May 09 04:03:50 2017 +0100 @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-10): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -79,26 +79,23 @@ # History of Summer Time # <http://pcdsh01.on.br/HISTHV.htm> # (1998-09-21, in Portuguese) - # # I invented the abbreviations marked '*' in the following table; -# the rest are from earlier versions of this file, or from other sources. -# Corrections are welcome! -# std dst 2dst -# LMT Local Mean Time -# -4:00 AST ADT Atlantic -# -3:00 WGT WGST Western Greenland* -# -1:00 EGT EGST Eastern Greenland* -# 0:00 GMT BST BDST Greenwich, British Summer -# 0:00 GMT IST Greenwich, Irish Summer -# 0:00 WET WEST WEMT Western Europe -# 0:19:32.13 AMT NST Amsterdam, Netherlands Summer (1835-1937)* -# 0:20 NET NEST Netherlands (1937-1940)* -# 1:00 BST British Standard (1968-1971) -# 1:00 CET CEST CEMT Central Europe -# 1:00:14 SET Swedish (1879-1899)* -# 2:00 EET EEST Eastern Europe -# 3:00 MSK MSD Moscow +# the rest are variants of the "xMT" pattern for a city's mean time, +# or are from other sources. Corrections are welcome! +# std dst 2dst +# LMT Local Mean Time +# -4:00 AST ADT Atlantic +# 0:00 GMT BST BDST Greenwich, British Summer +# 0:00 GMT IST Greenwich, Irish Summer +# 0:00 WET WEST WEMT Western Europe +# 0:19:32.13 AMT* NST* Amsterdam, Netherlands Summer (1835-1937) +# 1:00 BST British Standard (1968-1971) +# 1:00 CET CEST CEMT Central Europe +# 1:00:14 SET Swedish (1879-1899) +# 1:36:34 RMT* LST* Riga, Latvian Summer (1880-1926)* +# 2:00 EET EEST Eastern Europe +# 3:00 MSK MSD MDST* Moscow # From Peter Ilieve (1994-12-04), # The original six [EU members]: Belgium, France, (West) Germany, Italy, @@ -498,7 +495,7 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2 - -0:25:21 - DMT 1916 May 21 2:00 + -0:25:21 - DMT 1916 May 21 2:00 # Dublin MT -0:25:21 1:00 IST 1916 Oct 1 2:00s 0:00 GB-Eire %s 1921 Dec 6 # independence 0:00 GB-Eire GMT/IST 1940 Feb 25 2:00 @@ -924,7 +921,7 @@ # Cyprus # Please see the 'asia' file for Asia/Nicosia. -# Czech Republic +# Czech Republic / Czechia # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Czech 1945 only - Apr 8 2:00s 1:00 S Rule Czech 1945 only - Nov 18 2:00s 0 - @@ -1087,16 +1084,16 @@ # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Danmarkshavn -1:14:40 - LMT 1916 Jul 28 - -3:00 - WGT 1980 Apr 6 2:00 - -3:00 EU WG%sT 1996 + -3:00 - -03 1980 Apr 6 2:00 + -3:00 EU -03/-02 1996 0:00 - GMT Zone America/Scoresbysund -1:27:52 - LMT 1916 Jul 28 # Ittoqqortoormiit - -2:00 - CGT 1980 Apr 6 2:00 - -2:00 C-Eur CG%sT 1981 Mar 29 - -1:00 EU EG%sT + -2:00 - -02 1980 Apr 6 2:00 + -2:00 C-Eur -02/-01 1981 Mar 29 + -1:00 EU -01/+00 Zone America/Godthab -3:26:56 - LMT 1916 Jul 28 # Nuuk - -3:00 - WGT 1980 Apr 6 2:00 - -3:00 EU WG%sT + -3:00 - -03 1980 Apr 6 2:00 + -3:00 EU -03/-02 Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik air base -4:00 Thule A%sT @@ -1511,7 +1508,7 @@ Rule Iceland 1967 only - Oct 29 1:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Reykjavik -1:28 - LMT 1908 - -1:00 Iceland IS%sT 1968 Apr 7 1:00s + -1:00 Iceland -01/+00 1968 Apr 7 1:00s 0:00 - GMT # Italy @@ -1975,7 +1972,7 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Amsterdam 0:19:32 - LMT 1835 0:19:32 Neth %s 1937 Jul 1 - 0:20 Neth NE%sT 1940 May 16 0:00 # Dutch Time + 0:20 Neth +0020/+0120 1940 May 16 0:00 1:00 C-Eur CE%sT 1945 Apr 2 2:00 1:00 Neth CE%sT 1977 1:00 EU CE%sT @@ -2192,16 +2189,34 @@ 0:00 W-Eur WE%sT 1992 Sep 27 1:00s 1:00 EU CE%sT 1996 Mar 31 1:00u 0:00 EU WE%sT +# This Zone can be simplified once we assume zic %z. Zone Atlantic/Azores -1:42:40 - LMT 1884 # Ponta Delgada -1:54:32 - HMT 1912 Jan 1 # Horta Mean Time - -2:00 Port AZO%sT 1966 Apr 3 2:00 # Azores Time - -1:00 Port AZO%sT 1983 Sep 25 1:00s - -1:00 W-Eur AZO%sT 1992 Sep 27 1:00s + -2:00 Port -02/-01 1942 Apr 25 22:00s + -2:00 Port +00 1942 Aug 15 22:00s + -2:00 Port -02/-01 1943 Apr 17 22:00s + -2:00 Port +00 1943 Aug 28 22:00s + -2:00 Port -02/-01 1944 Apr 22 22:00s + -2:00 Port +00 1944 Aug 26 22:00s + -2:00 Port -02/-01 1945 Apr 21 22:00s + -2:00 Port +00 1945 Aug 25 22:00s + -2:00 Port -02/-01 1966 Apr 3 2:00 + -1:00 Port -01/+00 1983 Sep 25 1:00s + -1:00 W-Eur -01/+00 1992 Sep 27 1:00s 0:00 EU WE%sT 1993 Mar 28 1:00u - -1:00 EU AZO%sT + -1:00 EU -01/+00 +# This Zone can be simplified once we assume zic %z. Zone Atlantic/Madeira -1:07:36 - LMT 1884 # Funchal -1:07:36 - FMT 1912 Jan 1 # Funchal Mean Time - -1:00 Port MAD%sT 1966 Apr 3 2:00 # Madeira Time + -1:00 Port -01/+00 1942 Apr 25 22:00s + -1:00 Port +01 1942 Aug 15 22:00s + -1:00 Port -01/+00 1943 Apr 17 22:00s + -1:00 Port +01 1943 Aug 28 22:00s + -1:00 Port -01/+00 1944 Apr 22 22:00s + -1:00 Port +01 1944 Aug 26 22:00s + -1:00 Port -01/+00 1945 Apr 21 22:00s + -1:00 Port +01 1945 Aug 25 22:00s + -1:00 Port -01/+00 1966 Apr 3 2:00 0:00 Port WE%sT 1983 Sep 25 1:00s 0:00 EU WE%sT @@ -2559,10 +2574,8 @@ 3:00 - MSK -# From Tim Parenti (2014-07-03): -# Europe/Simferopol covers... -# ** **** Crimea, Republic of -# ** **** Sevastopol +# From Paul Eggert (2016-12-06): +# Europe/Simferopol covers Crimea. Zone Europe/Simferopol 2:16:24 - LMT 1880 2:16 - SMT 1924 May 2 # Simferopol Mean T @@ -2624,10 +2637,9 @@ 3:00 - +03 2016 Mar 27 2:00s 4:00 - +04 -# From Paul Eggert (2016-03-18): +# From Paul Eggert (2016-11-11): # Europe/Volgograd covers: # 34 RU-VGG Volgograd Oblast -# 64 RU-SAR Saratov Oblast # The 1988 transition is from USSR act No. 5 (1988-01-04). Zone Europe/Volgograd 2:57:40 - LMT 1920 Jan 3 @@ -2640,6 +2652,27 @@ 4:00 - +04 2014 Oct 26 2:00s 3:00 - +03 +# From Paul Eggert (2016-11-11): +# Europe/Saratov covers: +# 64 RU-SAR Saratov Oblast + +# From Yuri Konotopov (2016-11-11): +# Dec 4, 2016 02:00 UTC+3.... Saratov Region's local time will be ... UTC+4. +# From Stepan Golosunov (2016-11-11): +# ... Byalokoz listed Saratov on 03:04:18. +# From Stepan Golosunov (2016-11-22): +# http://publication.pravo.gov.ru/Document/View/0001201611220031 + +Zone Europe/Saratov 3:04:18 - LMT 1919 Jul 1 0:00u + 3:00 - +03 1930 Jun 21 + 4:00 Russia +04/+05 1988 Mar 27 2:00s + 3:00 Russia +03/+04 1991 Mar 31 2:00s + 4:00 - +04 1992 Mar 29 2:00s + 3:00 Russia +03/+04 2011 Mar 27 2:00s + 4:00 - +04 2014 Oct 26 2:00s + 3:00 - +03 2016 Dec 4 2:00s + 4:00 - +04 + # From Paul Eggert (2016-03-18): # Europe/Kirov covers: # 43 RU-KIR Kirov Oblast @@ -3235,46 +3268,77 @@ # See Europe/Belgrade. # Spain +# +# From Paul Eggert (2016-12-14): +# +# The source for Europe/Madrid before 2013 is: +# Planesas P. La hora oficial en España y sus cambios. +# Anuario del Observatorio Astronómico de Madrid (2013, in Spanish). +# http://astronomia.ign.es/rknowsys-theme/images/webAstro/paginas/documentos/Anuario/lahoraoficialenespana.pdf +# As this source says that historical time in the Canaries is obscure, +# and it does not discuss Ceuta, stick with Shanks for now for that data. +# +# In the 1918 and 1919 fallback transitions in Spain, the clock for +# the hour-longer day officially kept going after midnight, so that +# the repeated instances of that day's 00:00 hour were 24 hours apart, +# with a fallback transition from the second occurrence of 00:59... to +# the next day's 00:00. Our data format cannot represent this +# directly, and instead repeats the first hour of the next day, with a +# fallback transition from the next day's 00:59... to 00:00. + +# From Michael Deckers (2016-12-15): +# The Royal Decree of 1900-06-26 quoted by Planesas, online at +# https://www.boe.es/datos/pdfs/BOE//1900/209/A00383-00384.pdf +# says in its article 5 (my translation): +# These dispositions will enter into force beginning with the +# instant at which, according to the time indicated in article 1, +# the 1st day of January of 1901 will begin. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -# For 1917-1919 Whitman gives Apr Sat>=1 - Oct Sat>=1; -# go with Shanks & Pottenger. -Rule Spain 1917 only - May 5 23:00s 1:00 S -Rule Spain 1917 1919 - Oct 6 23:00s 0 - -Rule Spain 1918 only - Apr 15 23:00s 1:00 S -Rule Spain 1919 only - Apr 5 23:00s 1:00 S -# Whitman gives 1921 Feb 28 - Oct 14; go with Shanks & Pottenger. -Rule Spain 1924 only - Apr 16 23:00s 1:00 S -# Whitman gives 1924 Oct 14; go with Shanks & Pottenger. -Rule Spain 1924 only - Oct 4 23:00s 0 - -Rule Spain 1926 only - Apr 17 23:00s 1:00 S -# Whitman says no DST in 1929; go with Shanks & Pottenger. -Rule Spain 1926 1929 - Oct Sat>=1 23:00s 0 - -Rule Spain 1927 only - Apr 9 23:00s 1:00 S -Rule Spain 1928 only - Apr 14 23:00s 1:00 S -Rule Spain 1929 only - Apr 20 23:00s 1:00 S -# Whitman gives 1937 Jun 16, 1938 Apr 16, 1940 Apr 13; -# go with Shanks & Pottenger. -Rule Spain 1937 only - May 22 23:00s 1:00 S -Rule Spain 1937 1939 - Oct Sat>=1 23:00s 0 - -Rule Spain 1938 only - Mar 22 23:00s 1:00 S -Rule Spain 1939 only - Apr 15 23:00s 1:00 S -Rule Spain 1940 only - Mar 16 23:00s 1:00 S -# Whitman says no DST 1942-1945; go with Shanks & Pottenger. -Rule Spain 1942 only - May 2 22:00s 2:00 M # Midsummer -Rule Spain 1942 only - Sep 1 22:00s 1:00 S -Rule Spain 1943 1946 - Apr Sat>=13 22:00s 2:00 M -Rule Spain 1943 only - Oct 3 22:00s 1:00 S -Rule Spain 1944 only - Oct 10 22:00s 1:00 S -Rule Spain 1945 only - Sep 30 1:00 1:00 S -Rule Spain 1946 only - Sep 30 0:00 0 - +Rule Spain 1918 only - Apr 15 23:00 1:00 S +Rule Spain 1918 1919 - Oct 6 24:00s 0 - +Rule Spain 1919 only - Apr 6 23:00 1:00 S +Rule Spain 1924 only - Apr 16 23:00 1:00 S +Rule Spain 1924 only - Oct 4 24:00s 0 - +Rule Spain 1926 only - Apr 17 23:00 1:00 S +Rule Spain 1926 1929 - Oct Sat>=1 24:00s 0 - +Rule Spain 1927 only - Apr 9 23:00 1:00 S +Rule Spain 1928 only - Apr 15 0:00 1:00 S +Rule Spain 1929 only - Apr 20 23:00 1:00 S +# Republican Spain during the civil war; it controlled Madrid until 1939-03-28. +Rule Spain 1937 only - Jun 16 23:00 1:00 S +Rule Spain 1937 only - Oct 2 24:00s 0 - +Rule Spain 1938 only - Apr 2 23:00 1:00 S +Rule Spain 1938 only - Apr 30 23:00 2:00 M +Rule Spain 1938 only - Oct 2 24:00 1:00 S +# The following rules are for unified Spain again. +# +# Planesas does not say what happened in Madrid between its fall on +# 1939-03-28 and the Nationalist spring-forward transition on +# 1939-04-15. For lack of better info, assume Madrid's clocks did not +# change during that period. +# +# The first rule is commented out, as it is redundant for Republican Spain. +#Rule Spain 1939 only - Apr 15 23:00 1:00 S +Rule Spain 1939 only - Oct 7 24:00s 0 - +Rule Spain 1942 only - May 2 23:00 1:00 S +Rule Spain 1942 only - Sep 1 1:00 0 - +Rule Spain 1943 1946 - Apr Sat>=13 23:00 1:00 S +Rule Spain 1943 1944 - Oct Sun>=1 1:00 0 - +Rule Spain 1945 1946 - Sep lastSun 1:00 0 - Rule Spain 1949 only - Apr 30 23:00 1:00 S -Rule Spain 1949 only - Sep 30 1:00 0 - -Rule Spain 1974 1975 - Apr Sat>=13 23:00 1:00 S +Rule Spain 1949 only - Oct 2 1:00 0 - +Rule Spain 1974 1975 - Apr Sat>=12 23:00 1:00 S Rule Spain 1974 1975 - Oct Sun>=1 1:00 0 - Rule Spain 1976 only - Mar 27 23:00 1:00 S Rule Spain 1976 1977 - Sep lastSun 1:00 0 - -Rule Spain 1977 1978 - Apr 2 23:00 1:00 S -Rule Spain 1978 only - Oct 1 1:00 0 - +Rule Spain 1977 only - Apr 2 23:00 1:00 S +Rule Spain 1978 only - Apr 2 2:00s 1:00 S +Rule Spain 1978 only - Oct 1 2:00s 0 - +# Nationalist Spain during the civil war +#Rule NatSpain 1937 only - May 22 23:00 1:00 S +#Rule NatSpain 1937 1938 - Oct Sat>=1 24:00s 0 - +#Rule NatSpain 1938 only - Mar 26 23:00 1:00 S # The following rules are copied from Morocco from 1967 through 1978. Rule SpainAfrica 1967 only - Jun 3 12:00 1:00 S Rule SpainAfrica 1967 only - Oct 1 0:00 0 - @@ -3286,11 +3350,11 @@ Rule SpainAfrica 1978 only - Jun 1 0:00 1:00 S Rule SpainAfrica 1978 only - Aug 4 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Europe/Madrid -0:14:44 - LMT 1901 Jan 1 0:00s - 0:00 Spain WE%sT 1946 Sep 30 +Zone Europe/Madrid -0:14:44 - LMT 1900 Dec 31 23:45:16 + 0:00 Spain WE%sT 1940 Mar 16 23:00 1:00 Spain CE%sT 1979 1:00 EU CE%sT -Zone Africa/Ceuta -0:21:16 - LMT 1901 +Zone Africa/Ceuta -0:21:16 - LMT 1900 Dec 31 23:38:44 0:00 - WET 1918 May 6 23:00 0:00 1:00 WEST 1918 Oct 7 23:00 0:00 - WET 1924 @@ -3299,7 +3363,7 @@ 1:00 - CET 1986 1:00 EU CE%sT Zone Atlantic/Canary -1:01:36 - LMT 1922 Mar # Las Palmas de Gran C. - -1:00 - CANT 1946 Sep 30 1:00 # Canaries T + -1:00 - -01 1946 Sep 30 1:00 0:00 - WET 1980 Apr 6 0:00s 0:00 1:00 WEST 1980 Sep 28 1:00u 0:00 EU WE%sT @@ -3712,7 +3776,7 @@ # spelling, except omit the apostrophe as it is not allowed in # portable Posix file names. Zone Europe/Zaporozhye 2:20:40 - LMT 1880 - 2:20 - CUT 1924 May 2 # Central Ukraine T + 2:20 - +0220 1924 May 2 2:00 - EET 1930 Jun 21 3:00 - MSK 1941 Aug 25 1:00 C-Eur CE%sT 1943 Oct 25
--- a/make/data/tzdata/iso3166.tab Tue May 09 03:09:51 2017 +0100 +++ b/make/data/tzdata/iso3166.tab Tue May 09 04:03:50 2017 +0100 @@ -98,7 +98,7 @@ CR Costa Rica CU Cuba CV Cape Verde -CW Curacao +CW Curaçao CX Christmas Island CY Cyprus CZ Czech Republic
--- a/make/data/tzdata/leapseconds Tue May 09 03:09:51 2017 +0100 +++ b/make/data/tzdata/leapseconds Tue May 09 04:03:50 2017 +0100 @@ -81,5 +81,5 @@ Leap 2015 Jun 30 23:59:60 + S Leap 2016 Dec 31 23:59:60 + S -# Updated through IERS Bulletin C52 -# File expires on: 28 June 2017 +# Updated through IERS Bulletin C53 +# File expires on: 28 December 2017
--- a/make/data/tzdata/northamerica Tue May 09 03:09:51 2017 +0100 +++ b/make/data/tzdata/northamerica Tue May 09 04:03:50 2017 +0100 @@ -201,22 +201,6 @@ Zone MST7MDT -7:00 US M%sT Zone PST8PDT -8:00 US P%sT -# From Bob Devine (1988-01-28): -# ...Alaska (and Hawaii) had the timezone names changed in 1967. -# old new -# Pacific Standard Time(PST) -same- -# Yukon Standard Time(YST) -same- -# Central Alaska S.T. (CAT) Alaska-Hawaii St[an]dard Time (AHST) -# Nome Standard Time (NT) Bering Standard Time (BST) -# -# ...Alaska's timezone lines were redrawn in 1983 to give only 2 tz. -# The YST zone now covers nearly all of the state, AHST just part -# of the Aleutian islands. No DST. - -# From Paul Eggert (1995-12-19): -# The tables below use 'NST', not 'NT', for Nome Standard Time. -# I invented 'CAWT' for Central Alaska War Time. - # From U. S. Naval Observatory (1989-01-19): # USA EASTERN 5 H BEHIND UTC NEW YORK, WASHINGTON # USA EASTERN 4 H BEHIND UTC APR 3 - OCT 30 @@ -273,6 +257,21 @@ # Samoa standard time # The law doesn't give abbreviations. # +# From Paul Eggert (2016-12-19): +# Here are URLs for the 1918 and 1966 legislation: +# http://uscode.house.gov/statviewer.htm?volume=40&page=451 +# http://uscode.house.gov/statviewer.htm?volume=80&page=108 +# Although the 1918 names were officially "United States Standard +# Eastern Time" and similarly for "Central", "Mountain", "Pacific", +# and "Alaska", in practice "Standard" was placed just before "Time", +# as codified in 1966. In practice, Alaska time was abbreviated "AST" +# before 1968. Summarizing the 1967 name changes: +# 1918 names 1967 names +# -08 Standard Pacific Time (PST) Pacific standard time (PST) +# -09 (unofficial) Yukon (YST) Yukon standard time (YST) +# -10 Standard Alaska Time (AST) Alaska-Hawaii standard time (AHST) +# -11 (unofficial) Nome (NST) Bering standard time (BST) +# # From Paul Eggert (2000-01-08), following a heads-up from Rives McDow: # Public law 106-564 (2000-12-23) introduced ... "Chamorro Standard Time" # for time in Guam and the Northern Marianas. See the file "australasia". @@ -328,6 +327,15 @@ # Roberts, city administrator in Phenix City. as saying "We are in the Central # time zone, but we do go by the Eastern time zone because so many people work # in Columbus." +# +# From Paul Eggert (2017-02-22): +# Four cities are involved. The two not mentioned above are Smiths Station +# and Valley. Barbara Brooks, Valley's assistant treasurer, heard it started +# because West Point Pepperell textile mills were in Alabama while the +# corporate office was in Georgia, and residents voted to keep Eastern +# time even after the mills closed. See: Kazek K. Did you know which +# Alabama towns are in a different time zone? al.com 2017-02-06. +# http://www.al.com/living/index.ssf/2017/02/do_you_know_which_alabama_town.html # From Paul Eggert (2014-09-06): # Monthly Notices of the Royal Astronomical Society 44, 4 (1884-02-08), 208 @@ -505,7 +513,7 @@ -8:00 US P%sT # Alaska -# AK%sT is the modern abbreviation for -9:00 per USNO. +# AK%sT is the modern abbreviation for -09 per USNO. # # From Paul Eggert (2001-05-30): # Howse writes that Alaska switched from the Julian to the Gregorian calendar, @@ -611,10 +619,8 @@ -9:00 US AK%sT Zone America/Anchorage 14:00:24 - LMT 1867 Oct 18 -9:59:36 - LMT 1900 Aug 20 12:00 - -10:00 - CAT 1942 - -10:00 US CAT/CAWT 1945 Aug 14 23:00u - -10:00 US CAT/CAPT 1946 # Peace - -10:00 - CAT 1967 Apr + -10:00 - AST 1942 + -10:00 US A%sT 1967 Apr -10:00 - AHST 1969 -10:00 US AH%sT 1983 Oct 30 2:00 -9:00 US Y%sT 1983 Nov 30 @@ -703,7 +709,6 @@ -10:30 1:00 HDT 1945 Sep 30 2:00 -10:30 - HST 1947 Jun 8 2:00 -10:00 - HST -Link Pacific/Honolulu Pacific/Johnston # Now we turn to US areas that have diverged from the consensus since 1970. @@ -1091,15 +1096,15 @@ ################################################################################ -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-10): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -2757,15 +2762,15 @@ # Belize # Whitman entirely disagrees with Shanks; go with Shanks & Pottenger. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Belize 1918 1942 - Oct Sun>=2 0:00 0:30 HD -Rule Belize 1919 1943 - Feb Sun>=9 0:00 0 S -Rule Belize 1973 only - Dec 5 0:00 1:00 D -Rule Belize 1974 only - Feb 9 0:00 0 S -Rule Belize 1982 only - Dec 18 0:00 1:00 D -Rule Belize 1983 only - Feb 12 0:00 0 S +Rule Belize 1918 1942 - Oct Sun>=2 0:00 0:30 -0530 +Rule Belize 1919 1943 - Feb Sun>=9 0:00 0 CST +Rule Belize 1973 only - Dec 5 0:00 1:00 CDT +Rule Belize 1974 only - Feb 9 0:00 0 CST +Rule Belize 1982 only - Dec 18 0:00 1:00 CDT +Rule Belize 1983 only - Feb 12 0:00 0 CST # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Belize -5:52:48 - LMT 1912 Apr - -6:00 Belize C%sT + -6:00 Belize %s # Bermuda @@ -3037,16 +3042,16 @@ # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule DR 1966 only - Oct 30 0:00 1:00 D -Rule DR 1967 only - Feb 28 0:00 0 S -Rule DR 1969 1973 - Oct lastSun 0:00 0:30 HD -Rule DR 1970 only - Feb 21 0:00 0 S -Rule DR 1971 only - Jan 20 0:00 0 S -Rule DR 1972 1974 - Jan 21 0:00 0 S +Rule DR 1966 only - Oct 30 0:00 1:00 EDT +Rule DR 1967 only - Feb 28 0:00 0 EST +Rule DR 1969 1973 - Oct lastSun 0:00 0:30 -0430 +Rule DR 1970 only - Feb 21 0:00 0 EST +Rule DR 1971 only - Jan 20 0:00 0 EST +Rule DR 1972 1974 - Jan 21 0:00 0 EST # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Santo_Domingo -4:39:36 - LMT 1890 -4:40 - SDMT 1933 Apr 1 12:00 # S. Dom. MT - -5:00 DR E%sT 1974 Oct 27 + -5:00 DR %s 1974 Oct 27 -4:00 - AST 2000 Oct 29 2:00 -5:00 US E%sT 2000 Dec 3 1:00 -4:00 - AST @@ -3336,8 +3341,8 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Miquelon -3:44:40 - LMT 1911 May 15 # St Pierre -4:00 - AST 1980 May - -3:00 - PMST 1987 # Pierre & Miquelon Time - -3:00 Canada PM%sT + -3:00 - -03 1987 + -3:00 Canada -03/-02 # St Vincent and the Grenadines # See America/Port_of_Spain.
--- a/make/data/tzdata/southamerica Tue May 09 03:09:51 2017 +0100 +++ b/make/data/tzdata/southamerica Tue May 09 04:03:50 2017 +0100 @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2016-12-05): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -47,32 +47,10 @@ # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. # http://www.jstor.org/stable/1774359 # -# Earlier editions of these tables used the North American style (e.g. ARST and -# ARDT for Argentine Standard and Daylight Time), but the following quote -# suggests that it's better to use European style (e.g. ART and ARST). -# I suggest the use of _Summer time_ instead of the more cumbersome -# _daylight-saving time_. _Summer time_ seems to be in general use -# in Europe and South America. -# -- E O Cutler, _New York Times_ (1937-02-14), quoted in -# H L Mencken, _The American Language: Supplement I_ (1960), p 466 -# -# Earlier editions of these tables also used the North American style -# for time zones in Brazil, but this was incorrect, as Brazilians say -# "summer time". Reinaldo Goulart, a São Paulo businessman active in -# the railroad sector, writes (1999-07-06): -# The subject of time zones is currently a matter of discussion/debate in -# Brazil. Let's say that "the Brasília time" is considered the -# "official time" because Brasília is the capital city. -# The other three time zones are called "Brasília time "minus one" or -# "plus one" or "plus two". As far as I know there is no such -# name/designation as "Eastern Time" or "Central Time". -# So I invented the following (English-language) abbreviations for now. -# Corrections are welcome! -# std dst -# -2:00 FNT FNST Fernando de Noronha -# -3:00 BRT BRST Brasília -# -4:00 AMT AMST Amazon -# -5:00 ACT ACST Acre +# These tables use numeric abbreviations like -03 and -0330 for +# integer hour and minute UTC offsets. Although earlier editions used +# alphabetic time zone abbreviations, these abbreviations were +# invented and did not reflect common practice. ############################################################################### @@ -407,12 +385,6 @@ # # So I guess a new set of rules, besides "Arg", must be made and the last # America/Argentina/San_Luis entries should change to use these... -# -# I'm enclosing a patch that does what I say... regretfully, the San Luis -# timezone must be called "WART/WARST" even when most of the time (like, -# right now) WARST == ART... that is, since last Sunday, all the country -# is using UTC-3, but in my patch, San Luis calls it "WARST" and the rest -# of the country calls it "ART". # ... # From Alexander Krivenyshev (2010-04-09): @@ -451,11 +423,11 @@ # Buenos Aires (BA), Capital Federal (CF), Zone America/Argentina/Buenos_Aires -3:53:48 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May # Córdoba Mean Time - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 # # Córdoba (CB), Santa Fe (SF), Entre Ríos (ER), Corrientes (CN), Misiones (MN), # Chaco (CC), Formosa (FM), Santiago del Estero (SE) @@ -469,113 +441,113 @@ # Zone America/Argentina/Cordoba -4:16:48 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 # # Salta (SA), La Pampa (LP), Neuquén (NQ), Rio Negro (RN) Zone America/Argentina/Salta -4:21:40 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Tucumán (TM) Zone America/Argentina/Tucuman -4:20:52 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 13 - -3:00 Arg AR%sT + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 13 + -3:00 Arg -03/-02 # # La Rioja (LR) Zone America/Argentina/La_Rioja -4:27:24 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 1 - -4:00 - WART 1991 May 7 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 1 + -4:00 - -04 1991 May 7 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # San Juan (SJ) Zone America/Argentina/San_Juan -4:34:04 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 1 - -4:00 - WART 1991 May 7 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 May 31 - -4:00 - WART 2004 Jul 25 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 1 + -4:00 - -04 1991 May 7 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 May 31 + -4:00 - -04 2004 Jul 25 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Jujuy (JY) Zone America/Argentina/Jujuy -4:21:12 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1990 Mar 4 - -4:00 - WART 1990 Oct 28 - -4:00 1:00 WARST 1991 Mar 17 - -4:00 - WART 1991 Oct 6 - -3:00 1:00 ARST 1992 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1990 Mar 4 + -4:00 - -04 1990 Oct 28 + -4:00 1:00 -03 1991 Mar 17 + -4:00 - -04 1991 Oct 6 + -3:00 1:00 -02 1992 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Catamarca (CT), Chubut (CH) Zone America/Argentina/Catamarca -4:23:08 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Mendoza (MZ) Zone America/Argentina/Mendoza -4:35:16 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1990 Mar 4 - -4:00 - WART 1990 Oct 15 - -4:00 1:00 WARST 1991 Mar 1 - -4:00 - WART 1991 Oct 15 - -4:00 1:00 WARST 1992 Mar 1 - -4:00 - WART 1992 Oct 18 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 May 23 - -4:00 - WART 2004 Sep 26 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1990 Mar 4 + -4:00 - -04 1990 Oct 15 + -4:00 1:00 -03 1991 Mar 1 + -4:00 - -04 1991 Oct 15 + -4:00 1:00 -03 1992 Mar 1 + -4:00 - -04 1992 Oct 18 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 May 23 + -4:00 - -04 2004 Sep 26 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # San Luis (SL) @@ -584,44 +556,44 @@ Zone America/Argentina/San_Luis -4:25:24 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1990 - -3:00 1:00 ARST 1990 Mar 14 - -4:00 - WART 1990 Oct 15 - -4:00 1:00 WARST 1991 Mar 1 - -4:00 - WART 1991 Jun 1 - -3:00 - ART 1999 Oct 3 - -4:00 1:00 WARST 2000 Mar 3 - -3:00 - ART 2004 May 31 - -4:00 - WART 2004 Jul 25 - -3:00 Arg AR%sT 2008 Jan 21 - -4:00 SanLuis WAR%sT 2009 Oct 11 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1990 + -3:00 1:00 -02 1990 Mar 14 + -4:00 - -04 1990 Oct 15 + -4:00 1:00 -03 1991 Mar 1 + -4:00 - -04 1991 Jun 1 + -3:00 - -03 1999 Oct 3 + -4:00 1:00 -03 2000 Mar 3 + -3:00 - -03 2004 May 31 + -4:00 - -04 2004 Jul 25 + -3:00 Arg -03/-02 2008 Jan 21 + -4:00 SanLuis -04/-03 2009 Oct 11 + -3:00 - -03 # # Santa Cruz (SC) Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31 - -4:16:48 - CMT 1920 May # Córdoba Mean Time - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:16:48 - CMT 1920 May + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Tierra del Fuego, Antártida e Islas del Atlántico Sur (TF) Zone America/Argentina/Ushuaia -4:33:12 - LMT 1894 Oct 31 - -4:16:48 - CMT 1920 May # Córdoba Mean Time - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 May 30 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:16:48 - CMT 1920 May + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 May 30 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # Aruba Link America/Curacao America/Aruba @@ -631,7 +603,7 @@ Zone America/La_Paz -4:32:36 - LMT 1890 -4:32:36 - CMT 1931 Oct 15 # Calamarca MT -4:32:36 1:00 BOST 1932 Mar 21 # Bolivia ST - -4:00 - BOT # Bolivia Time + -4:00 - -04 # Brazil @@ -983,12 +955,12 @@ # # Fernando de Noronha (administratively part of PE) Zone America/Noronha -2:09:40 - LMT 1914 - -2:00 Brazil FN%sT 1990 Sep 17 - -2:00 - FNT 1999 Sep 30 - -2:00 Brazil FN%sT 2000 Oct 15 - -2:00 - FNT 2001 Sep 13 - -2:00 Brazil FN%sT 2002 Oct 1 - -2:00 - FNT + -2:00 Brazil -02/-01 1990 Sep 17 + -2:00 - -02 1999 Sep 30 + -2:00 Brazil -02/-01 2000 Oct 15 + -2:00 - -02 2001 Sep 13 + -2:00 Brazil -02/-01 2002 Oct 1 + -2:00 - -02 # Other Atlantic islands have no permanent settlement. # These include Trindade and Martim Vaz (administratively part of ES), # Rocas Atoll (RN), and the St Peter and St Paul Archipelago (PE). @@ -1001,119 +973,119 @@ # In the north a very small part from the river Javary (now Jari I guess, # the border with Amapá) to the Amazon, then to the Xingu. Zone America/Belem -3:13:56 - LMT 1914 - -3:00 Brazil BR%sT 1988 Sep 12 - -3:00 - BRT + -3:00 Brazil -03/-02 1988 Sep 12 + -3:00 - -03 # # west Pará (PA) # West Pará includes Altamira, Óbidos, Prainha, Oriximiná, and Santarém. Zone America/Santarem -3:38:48 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT 2008 Jun 24 0:00 - -3:00 - BRT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 2008 Jun 24 0:00 + -3:00 - -03 # # Maranhão (MA), Piauí (PI), Ceará (CE), Rio Grande do Norte (RN), # Paraíba (PB) Zone America/Fortaleza -2:34:00 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1999 Sep 30 - -3:00 Brazil BR%sT 2000 Oct 22 - -3:00 - BRT 2001 Sep 13 - -3:00 Brazil BR%sT 2002 Oct 1 - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1999 Sep 30 + -3:00 Brazil -03/-02 2000 Oct 22 + -3:00 - -03 2001 Sep 13 + -3:00 Brazil -03/-02 2002 Oct 1 + -3:00 - -03 # # Pernambuco (PE) (except Atlantic islands) Zone America/Recife -2:19:36 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1999 Sep 30 - -3:00 Brazil BR%sT 2000 Oct 15 - -3:00 - BRT 2001 Sep 13 - -3:00 Brazil BR%sT 2002 Oct 1 - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1999 Sep 30 + -3:00 Brazil -03/-02 2000 Oct 15 + -3:00 - -03 2001 Sep 13 + -3:00 Brazil -03/-02 2002 Oct 1 + -3:00 - -03 # # Tocantins (TO) Zone America/Araguaina -3:12:48 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1995 Sep 14 - -3:00 Brazil BR%sT 2003 Sep 24 - -3:00 - BRT 2012 Oct 21 - -3:00 Brazil BR%sT 2013 Sep - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1995 Sep 14 + -3:00 Brazil -03/-02 2003 Sep 24 + -3:00 - -03 2012 Oct 21 + -3:00 Brazil -03/-02 2013 Sep + -3:00 - -03 # # Alagoas (AL), Sergipe (SE) Zone America/Maceio -2:22:52 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1995 Oct 13 - -3:00 Brazil BR%sT 1996 Sep 4 - -3:00 - BRT 1999 Sep 30 - -3:00 Brazil BR%sT 2000 Oct 22 - -3:00 - BRT 2001 Sep 13 - -3:00 Brazil BR%sT 2002 Oct 1 - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1995 Oct 13 + -3:00 Brazil -03/-02 1996 Sep 4 + -3:00 - -03 1999 Sep 30 + -3:00 Brazil -03/-02 2000 Oct 22 + -3:00 - -03 2001 Sep 13 + -3:00 Brazil -03/-02 2002 Oct 1 + -3:00 - -03 # # Bahia (BA) # There are too many Salvadors elsewhere, so use America/Bahia instead # of America/Salvador. Zone America/Bahia -2:34:04 - LMT 1914 - -3:00 Brazil BR%sT 2003 Sep 24 - -3:00 - BRT 2011 Oct 16 - -3:00 Brazil BR%sT 2012 Oct 21 - -3:00 - BRT + -3:00 Brazil -03/-02 2003 Sep 24 + -3:00 - -03 2011 Oct 16 + -3:00 Brazil -03/-02 2012 Oct 21 + -3:00 - -03 # # Goiás (GO), Distrito Federal (DF), Minas Gerais (MG), # Espírito Santo (ES), Rio de Janeiro (RJ), São Paulo (SP), Paraná (PR), # Santa Catarina (SC), Rio Grande do Sul (RS) Zone America/Sao_Paulo -3:06:28 - LMT 1914 - -3:00 Brazil BR%sT 1963 Oct 23 0:00 - -3:00 1:00 BRST 1964 - -3:00 Brazil BR%sT + -3:00 Brazil -03/-02 1963 Oct 23 0:00 + -3:00 1:00 -02 1964 + -3:00 Brazil -03/-02 # # Mato Grosso do Sul (MS) Zone America/Campo_Grande -3:38:28 - LMT 1914 - -4:00 Brazil AM%sT + -4:00 Brazil -04/-03 # # Mato Grosso (MT) Zone America/Cuiaba -3:44:20 - LMT 1914 - -4:00 Brazil AM%sT 2003 Sep 24 - -4:00 - AMT 2004 Oct 1 - -4:00 Brazil AM%sT + -4:00 Brazil -04/-03 2003 Sep 24 + -4:00 - -04 2004 Oct 1 + -4:00 Brazil -04/-03 # # Rondônia (RO) Zone America/Porto_Velho -4:15:36 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 # # Roraima (RR) Zone America/Boa_Vista -4:02:40 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT 1999 Sep 30 - -4:00 Brazil AM%sT 2000 Oct 15 - -4:00 - AMT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 1999 Sep 30 + -4:00 Brazil -04/-03 2000 Oct 15 + -4:00 - -04 # # east Amazonas (AM): Boca do Acre, Jutaí, Manaus, Floriano Peixoto # The great circle line from Tabatinga to Porto Acre divides # east from west Amazonas. Zone America/Manaus -4:00:04 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT 1993 Sep 28 - -4:00 Brazil AM%sT 1994 Sep 22 - -4:00 - AMT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 1993 Sep 28 + -4:00 Brazil -04/-03 1994 Sep 22 + -4:00 - -04 # # west Amazonas (AM): Atalaia do Norte, Boca do Maoco, Benjamin Constant, # Eirunepé, Envira, Ipixuna Zone America/Eirunepe -4:39:28 - LMT 1914 - -5:00 Brazil AC%sT 1988 Sep 12 - -5:00 - ACT 1993 Sep 28 - -5:00 Brazil AC%sT 1994 Sep 22 - -5:00 - ACT 2008 Jun 24 0:00 - -4:00 - AMT 2013 Nov 10 - -5:00 - ACT + -5:00 Brazil -05/-04 1988 Sep 12 + -5:00 - -05 1993 Sep 28 + -5:00 Brazil -05/-04 1994 Sep 22 + -5:00 - -05 2008 Jun 24 0:00 + -4:00 - -04 2013 Nov 10 + -5:00 - -05 # # Acre (AC) Zone America/Rio_Branco -4:31:12 - LMT 1914 - -5:00 Brazil AC%sT 1988 Sep 12 - -5:00 - ACT 2008 Jun 24 0:00 - -4:00 - AMT 2013 Nov 10 - -5:00 - ACT + -5:00 Brazil -05/-04 1988 Sep 12 + -5:00 - -05 2008 Jun 24 0:00 + -4:00 - -04 2013 Nov 10 + -5:00 - -05 # Chile @@ -1258,6 +1230,18 @@ # to mean 24:00 mainland time, not 24:00 local time, so that Easter # Island is always two hours behind the mainland. +# From Juan Correa (2016-12-04): +# Magallanes region ... will keep DST (UTC -3) all year round.... +# http://www.soychile.cl/Santiago/Sociedad/2016/12/04/433428/Bachelet-firmo-el-decreto-para-establecer-un-horario-unico-para-la-Region-de-Magallanes.aspx +# +# From Deborah Goldsmith (2017-01-19): +# http://www.diariooficial.interior.gob.cl/publicaciones/2017/01/17/41660/01/1169626.pdf +# From Paul Eggert (2017-01-19): +# The above says the Magallanes change expires 2019-05-11 at 24:00, +# so in theory, they will revert to -04/-03 after that, which means +# they will switch from -03 to -04 one hour after Santiago does that day. +# For now, assume that they will not revert. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Chile 1927 1931 - Sep 1 0:00 1:00 S Rule Chile 1928 1932 - Apr 1 0:00 0 - @@ -1298,22 +1282,35 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Santiago -4:42:46 - LMT 1890 -4:42:46 - SMT 1910 Jan 10 # Santiago Mean Time - -5:00 - CLT 1916 Jul 1 # Chile Time + -5:00 - -05 1916 Jul 1 -4:42:46 - SMT 1918 Sep 10 - -4:00 - CLT 1919 Jul 1 + -4:00 - -04 1919 Jul 1 -4:42:46 - SMT 1927 Sep 1 - -5:00 Chile CL%sT 1932 Sep 1 - -4:00 - CLT 1942 Jun 1 - -5:00 - CLT 1942 Aug 1 - -4:00 - CLT 1946 Jul 15 - -4:00 1:00 CLST 1946 Sep 1 # central Chile - -4:00 - CLT 1947 Apr 1 - -5:00 - CLT 1947 May 21 23:00 - -4:00 Chile CL%sT + -5:00 Chile -05/-04 1932 Sep 1 + -4:00 - -04 1942 Jun 1 + -5:00 - -05 1942 Aug 1 + -4:00 - -04 1946 Jul 15 + -4:00 1:00 -03 1946 Sep 1 # central Chile + -4:00 - -04 1947 Apr 1 + -5:00 - -05 1947 May 21 23:00 + -4:00 Chile -04/-03 +Zone America/Punta_Arenas -4:43:40 - LMT 1890 + -4:42:46 - SMT 1910 Jan 10 + -5:00 - -05 1916 Jul 1 + -4:42:46 - SMT 1918 Sep 10 + -4:00 - -04 1919 Jul 1 + -4:42:46 - SMT 1927 Sep 1 + -5:00 Chile -05/-04 1932 Sep 1 + -4:00 - -04 1942 Jun 1 + -5:00 - -05 1942 Aug 1 + -4:00 - -04 1947 Apr 1 + -5:00 - -05 1947 May 21 23:00 + -4:00 Chile -04/-03 2016 Dec 4 + -3:00 - -03 Zone Pacific/Easter -7:17:28 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time - -6:00 Chile EAS%sT + -7:00 Chile -07/-06 1982 Mar 14 3:00u # Easter Time + -6:00 Chile -06/-05 # # Salas y Gómez Island is uninhabited. # Other Chilean locations, including Juan Fernández Is, Desventuradas Is, @@ -1333,9 +1330,10 @@ # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Antarctica/Palmer 0 - -00 1965 - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1982 May - -4:00 Chile CL%sT + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1982 May + -4:00 Chile -04/-03 2016 Dec 4 + -3:00 - -03 # Colombia @@ -1348,7 +1346,7 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Bogota -4:56:16 - LMT 1884 Mar 13 -4:56:16 - BMT 1914 Nov 23 # Bogotá Mean Time - -5:00 CO CO%sT # Colombia Time + -5:00 CO -05/-04 # Malpelo, Providencia, San Andres # no information; probably like America/Bogota @@ -1372,7 +1370,7 @@ # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Curacao -4:35:47 - LMT 1912 Feb 12 # Willemstad - -4:30 - ANT 1965 # Netherlands Antilles Time + -4:30 - -0430 1965 -4:00 - AST # From Arthur David Olson (2011-06-15): @@ -1387,19 +1385,32 @@ # # Milne says the Central and South American Telegraph Company used -5:24:15. # -# From Paul Eggert (2007-03-04): -# Apparently Ecuador had a failed experiment with DST in 1992. -# <http://midena.gov.ec/content/view/1261/208/> (2007-02-27) and -# <http://www.hoy.com.ec/NoticiaNue.asp?row_id=249856> (2006-11-06) both -# talk about "hora Sixto". Leave this alone for now, as we have no data. +# From Alois Treindl (2016-12-15): +# http://www.elcomercio.com/actualidad/hora-sixto-1993.html +# ... Whether the law applied also to Galápagos, I do not know. +# From Paul Eggert (2016-12-15): +# http://www.elcomercio.com/afull/modificacion-husohorario-ecuador-presidentes-decreto.html +# This says President Sixto Durán Ballén signed decree No. 285, which +# established DST from 1992-11-28 to 1993-02-05; it does not give transition +# times. The people called it "hora de Sixto" ("Sixto hour"). The change did +# not go over well; a popular song "Qué hora es" by Jaime Guevara had lyrics +# that included "Amanecía en mitad de la noche, los guaguas iban a clase sin +# sol" ("It was dawning in the middle of the night, the buses went to class +# without sun"). Although Ballén's campaign slogan was "Ni un paso atrás" +# (Not one step back), the clocks went back in 1993 and the experiment was not +# repeated. For now, assume transitions were at 00:00 local time country-wide. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Ecuador 1992 only - Nov 28 0:00 1:00 S +Rule Ecuador 1993 only - Feb 5 0:00 0 - # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Guayaquil -5:19:20 - LMT 1890 -5:14:00 - QMT 1931 # Quito Mean Time - -5:00 - ECT # Ecuador Time + -5:00 Ecuador -05/-04 Zone Pacific/Galapagos -5:58:24 - LMT 1931 # Puerto Baquerizo Moreno - -5:00 - ECT 1986 - -6:00 - GALT # Galápagos Time + -5:00 - -05 1986 + -6:00 Ecuador -06/-05 # Falklands @@ -1499,25 +1510,24 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Stanley -3:51:24 - LMT 1890 -3:51:24 - SMT 1912 Mar 12 # Stanley Mean Time - -4:00 Falk FK%sT 1983 May # Falkland Is Time - -3:00 Falk FK%sT 1985 Sep 15 - -4:00 Falk FK%sT 2010 Sep 5 2:00 - -3:00 - FKST + -4:00 Falk -04/-03 1983 May + -3:00 Falk -03/-02 1985 Sep 15 + -4:00 Falk -04/-03 2010 Sep 5 2:00 + -3:00 - -03 # French Guiana # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Cayenne -3:29:20 - LMT 1911 Jul - -4:00 - GFT 1967 Oct # French Guiana Time - -3:00 - GFT + -4:00 - -04 1967 Oct + -3:00 - -03 # Guyana # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Guyana -3:52:40 - LMT 1915 Mar # Georgetown - -3:45 - GBGT 1966 May 26 # Br Guiana Time - -3:45 - GYT 1975 Jul 31 # Guyana Time - -3:00 - GYT 1991 + -3:45 - -0345 1975 Jul 31 + -3:00 - -03 1991 # IATA SSIM (1996-06) says -4:00. Assume a 1991 switch. - -4:00 - GYT + -4:00 - -04 # Paraguay # @@ -1609,9 +1619,9 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Asuncion -3:50:40 - LMT 1890 -3:50:40 - AMT 1931 Oct 10 # Asunción Mean Time - -4:00 - PYT 1972 Oct # Paraguay Time - -3:00 - PYT 1974 Apr - -4:00 Para PY%sT + -4:00 - -04 1972 Oct + -3:00 - -03 1974 Apr + -4:00 Para -04/-03 # Peru # @@ -1638,12 +1648,12 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Lima -5:08:12 - LMT 1890 -5:08:36 - LMT 1908 Jul 28 # Lima Mean Time? - -5:00 Peru PE%sT # Peru Time + -5:00 Peru -05/-04 # South Georgia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/South_Georgia -2:26:08 - LMT 1890 # Grytviken - -2:00 - GST # South Georgia Time + -2:00 - -02 # South Sandwich Is # uninhabited; scientific personnel have wintered @@ -1653,9 +1663,8 @@ Zone America/Paramaribo -3:40:40 - LMT 1911 -3:40:52 - PMT 1935 # Paramaribo Mean Time -3:40:36 - PMT 1945 Oct # The capital moved? - -3:30 - NEGT 1975 Nov 20 # Dutch Guiana Time - -3:30 - SRT 1984 Oct # Suriname Time - -3:00 - SRT + -3:30 - -0330 1984 Oct + -3:00 - -03 # Trinidad and Tobago # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1758,11 +1767,16 @@ # [dated 2015-06-29; repeals Decree 311/006 dated 2006-09-04] Rule Uruguay 2006 2014 - Oct Sun>=1 2:00 1:00 S Rule Uruguay 2007 2015 - Mar Sun>=8 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] + +# This Zone can be simplified once we assume zic %z. Zone America/Montevideo -3:44:44 - LMT 1898 Jun 28 -3:44:44 - MMT 1920 May 1 # Montevideo MT - -3:30 Uruguay UY%sT 1942 Dec 14 # Uruguay Time - -3:00 Uruguay UY%sT + -3:30 Uruguay -0330/-03 1942 Dec 14 + -3:00 Uruguay -03/-02 1968 + -3:00 Uruguay -03/-0230 1971 + -3:00 Uruguay -03/-02 1974 + -3:00 Uruguay -03/-0230 1974 Dec 22 + -3:00 Uruguay -03/-02 # Venezuela # @@ -1796,7 +1810,7 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Caracas -4:27:44 - LMT 1890 -4:27:40 - CMT 1912 Feb 12 # Caracas Mean Time? - -4:30 - VET 1965 Jan 1 0:00 # Venezuela T. - -4:00 - VET 2007 Dec 9 3:00 - -4:30 - VET 2016 May 1 2:30 - -4:00 - VET + -4:30 - -0430 1965 Jan 1 0:00 + -4:00 - -04 2007 Dec 9 3:00 + -4:30 - -0430 2016 May 1 2:30 + -4:00 - -04
--- a/make/data/tzdata/zone.tab Tue May 09 03:09:51 2017 +0100 +++ b/make/data/tzdata/zone.tab Tue May 09 04:03:50 2017 +0100 @@ -165,6 +165,7 @@ CI +0519-00402 Africa/Abidjan CK -2114-15946 Pacific/Rarotonga CL -3327-07040 America/Santiago Chile (most areas) +CL -5309-07055 America/Punta_Arenas Region of Magallanes CL -2709-10926 Pacific/Easter Easter Island CM +0403+00942 Africa/Douala CN +3114+12128 Asia/Shanghai Beijing Time @@ -262,7 +263,8 @@ KZ +4315+07657 Asia/Almaty Kazakhstan (most areas) KZ +4448+06528 Asia/Qyzylorda Qyzylorda/Kyzylorda/Kzyl-Orda KZ +5017+05710 Asia/Aqtobe Aqtobe/Aktobe -KZ +4431+05016 Asia/Aqtau Atyrau/Atirau/Gur'yev, Mangghystau/Mankistau +KZ +4431+05016 Asia/Aqtau Mangghystau/Mankistau +KZ +4707+05156 Asia/Atyrau Atyrau/Atirau/Gur'yev KZ +5113+05121 Asia/Oral West Kazakhstan LA +1758+10236 Asia/Vientiane LB +3353+03530 Asia/Beirut @@ -353,14 +355,15 @@ RU +5443+02030 Europe/Kaliningrad MSK-01 - Kaliningrad RU +554521+0373704 Europe/Moscow MSK+00 - Moscow area RU +4457+03406 Europe/Simferopol MSK+00 - Crimea -RU +4844+04425 Europe/Volgograd MSK+00 - Volgograd, Saratov +RU +4844+04425 Europe/Volgograd MSK+00 - Volgograd RU +5836+04939 Europe/Kirov MSK+00 - Kirov RU +4621+04803 Europe/Astrakhan MSK+01 - Astrakhan +RU +5134+04602 Europe/Saratov MSK+01 - Saratov +RU +5420+04824 Europe/Ulyanovsk MSK+01 - Ulyanovsk RU +5312+05009 Europe/Samara MSK+01 - Samara, Udmurtia -RU +5420+04824 Europe/Ulyanovsk MSK+01 - Ulyanovsk RU +5651+06036 Asia/Yekaterinburg MSK+02 - Urals RU +5500+07324 Asia/Omsk MSK+03 - Omsk -RU +5502+08255 Asia/Novosibirsk MSK+03 - Novosibirsk +RU +5502+08255 Asia/Novosibirsk MSK+04 - Novosibirsk RU +5322+08345 Asia/Barnaul MSK+04 - Altai RU +5630+08458 Asia/Tomsk MSK+04 - Tomsk RU +5345+08707 Asia/Novokuznetsk MSK+04 - Kemerovo @@ -418,7 +421,6 @@ UA +4837+02218 Europe/Uzhgorod Ruthenia UA +4750+03510 Europe/Zaporozhye Zaporozh'ye/Zaporizhia; Lugansk/Luhansk (east) UG +0019+03225 Africa/Kampala -UM +1645-16931 Pacific/Johnston Johnston Atoll UM +2813-17722 Pacific/Midway Midway Islands UM +1917+16637 Pacific/Wake Wake Island US +404251-0740023 America/New_York Eastern (most areas)
--- a/src/macosx/classes/com/apple/eawt/_AppDockIconHandler.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/com/apple/eawt/_AppDockIconHandler.java Tue May 09 04:03:50 2017 +0100 @@ -72,8 +72,7 @@ public void setDockIconImage(final Image image) { try { final CImage cImage = getCImageCreator().createFromImage(image); - final long nsImagePtr = getNSImagePtrFrom(cImage); - nativeSetDockIconImage(nsImagePtr); + cImage.execute(_AppDockIconHandler::nativeSetDockIconImage); } catch (final Throwable e) { throw new RuntimeException(e); } @@ -102,16 +101,4 @@ throw new RuntimeException(e); } } - - static long getNSImagePtrFrom(final CImage cImage) { - if (cImage == null) return 0; - - try { - final Field cImagePtrField = CFRetainedResource.class.getDeclaredField("ptr"); - cImagePtrField.setAccessible(true); - return cImagePtrField.getLong(cImage); - } catch (final Throwable e) { - throw new RuntimeException(e); - } - } }
--- a/src/macosx/classes/com/apple/laf/resources/aqua_de.properties Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/com/apple/laf/resources/aqua_de.properties Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2017, 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 @@ -46,7 +46,7 @@ FileChooser.openButton.textAndMnemonic=\u00D6ffnen FileChooser.saveDialogTitle.textAndMnemonic=Speichern FileChooser.openDialogTitle.textAndMnemonic=\u00D6ffnen -FileChooser.updateButton.textAndMnemonic=Updaten +FileChooser.updateButton.textAndMnemonic=Aktualisieren FileChooser.helpButton.textAndMnemonic=Hilfe FileChooser.directoryOpenButton.textAndMnemonic=\u00D6ffnen
--- a/src/macosx/classes/sun/java2d/opengl/CGLLayer.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/java2d/opengl/CGLLayer.java Tue May 09 04:03:50 2017 +0100 @@ -108,7 +108,7 @@ OGLRenderQueue rq = OGLRenderQueue.getInstance(); rq.lock(); try { - validate(getPointer(), cglsd); + execute(ptr -> validate(ptr, cglsd)); } finally { rq.unlock(); } @@ -124,7 +124,7 @@ private void setScale(final int _scale) { if (scale != _scale) { scale = _scale; - nativeSetScale(getPointer(), scale); + execute(ptr -> nativeSetScale(ptr, scale)); } } @@ -138,7 +138,7 @@ OGLRenderQueue rq = OGLRenderQueue.getInstance(); rq.lock(); try { - blitTexture(getPointer()); + execute(ptr -> blitTexture(ptr)); } finally { rq.unlock(); }
--- a/src/macosx/classes/sun/lwawt/LWMouseInfoPeer.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/LWMouseInfoPeer.java Tue May 09 04:03:50 2017 +0100 @@ -51,8 +51,12 @@ return false; } - final Object windowPeer = AWTAccessor.getComponentAccessor().getPeer(w); - return LWWindowPeer.getWindowUnderCursor() == windowPeer; + LWWindowPeer windowPeer = (LWWindowPeer)AWTAccessor.getComponentAccessor().getPeer(w); + if (windowPeer == null) { + return false; + } + + return LWToolkit.getLWToolkit().getPlatformWindowUnderMouse() == windowPeer.getPlatformWindow(); } }
--- a/src/macosx/classes/sun/lwawt/LWToolkit.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/LWToolkit.java Tue May 09 04:03:50 2017 +0100 @@ -385,6 +385,8 @@ return new LWMouseInfoPeer(); } + protected abstract PlatformWindow getPlatformWindowUnderMouse(); + @Override public final PrintJob getPrintJob(Frame frame, String doctitle, Properties props) {
--- a/src/macosx/classes/sun/lwawt/LWWindowPeer.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/LWWindowPeer.java Tue May 09 04:03:50 2017 +0100 @@ -749,11 +749,10 @@ lastMouseEventPeer = targetPeer; } } else { - PlatformWindow topmostPlatforWindow = - platformWindow.getTopmostPlatformWindowUnderMouse(); + PlatformWindow topmostPlatformWindow = LWToolkit.getLWToolkit().getPlatformWindowUnderMouse(); LWWindowPeer topmostWindowPeer = - topmostPlatforWindow != null ? topmostPlatforWindow.getPeer() : null; + topmostPlatformWindow != null ? topmostPlatformWindow.getPeer() : null; // topmostWindowPeer == null condition is added for the backward // compatibility with applets. It can be removed when the @@ -764,8 +763,7 @@ absX, absY, modifiers, clickCount, popupTrigger, targetPeer); } else { - LWComponentPeer<?, ?> topmostTargetPeer = - topmostWindowPeer != null ? topmostWindowPeer.findPeerAt(r.x + x, r.y + y) : null; + LWComponentPeer<?, ?> topmostTargetPeer = topmostWindowPeer.findPeerAt(r.x + x, r.y + y); topmostWindowPeer.generateMouseEnterExitEventsForComponents(when, button, x, y, absX, absY, modifiers, clickCount, popupTrigger, topmostTargetPeer);
--- a/src/macosx/classes/sun/lwawt/PlatformWindow.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/PlatformWindow.java Tue May 09 04:03:50 2017 +0100 @@ -107,8 +107,6 @@ public void setAlwaysOnTop(boolean value); - public PlatformWindow getTopmostPlatformWindowUnderMouse(); - public void updateFocusableWindowState(); public boolean rejectFocusRequest(CausedFocusEvent.Cause cause);
--- a/src/macosx/classes/sun/lwawt/macosx/CFRetainedResource.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/macosx/CFRetainedResource.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, 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 @@ -25,6 +25,10 @@ package sun.lwawt.macosx; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; + /** * Safely holds and disposes of native AppKit resources, using the * correct AppKit threading and Objective-C GC semantics. @@ -36,6 +40,10 @@ // TODO this pointer should be private and accessed via CFNativeAction class protected volatile long ptr; + private final ReadWriteLock lock = new ReentrantReadWriteLock(); + private final Lock writeLock = lock.writeLock(); + private final Lock readLock = lock.readLock(); + /** * @param ptr CFRetained native object pointer * @param disposeOnAppKitThread is the object needs to be CFReleased on the main thread @@ -50,21 +58,31 @@ * @param ptr CFRetained native object pointer */ protected void setPtr(final long ptr) { - synchronized (this) { - if (this.ptr != 0) dispose(); + writeLock.lock(); + try { + if (this.ptr != 0) { + dispose(); + } this.ptr = ptr; + } finally { + writeLock.unlock(); } } /** - * Manually CFReleases the native resource + * Manually CFReleases the native resource. */ protected void dispose() { long oldPtr = 0L; - synchronized (this) { - if (ptr == 0) return; + writeLock.lock(); + try { + if (ptr == 0) { + return; + } oldPtr = ptr; ptr = 0; + } finally { + writeLock.unlock(); } nativeCFRelease(oldPtr, disposeOnAppKitThread); // perform outside of the synchronized block @@ -109,9 +127,14 @@ * * @param action The native operation */ - public final synchronized void execute(final CFNativeAction action) { - if (ptr != 0) { - action.run(ptr); + public final void execute(final CFNativeAction action) { + readLock.lock(); + try { + if (ptr != 0) { + action.run(ptr); + } + } finally { + readLock.unlock(); } } @@ -127,9 +150,14 @@ * @return result of the native operation, usually the native pointer to * some other data */ - final synchronized long executeGet(final CFNativeActionGet action) { - if (ptr != 0) { - return action.run(ptr); + final long executeGet(final CFNativeActionGet action) { + readLock.lock(); + try { + if (ptr != 0) { + return action.run(ptr); + } + } finally { + readLock.unlock(); } return 0; }
--- a/src/macosx/classes/sun/lwawt/macosx/CImage.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/macosx/CImage.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, 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 @@ -33,6 +33,7 @@ import java.util.List; import sun.awt.image.MultiResolutionImage; import sun.awt.image.MultiResolutionCachedImage; +import java.util.concurrent.atomic.AtomicReference; import sun.awt.image.SunWritableRaster; @@ -235,15 +236,26 @@ /** @return A MultiResolution image created from nsImagePtr, or null. */ private Image toImage() { - if (ptr == 0) return null; + if (ptr == 0) { + return null; + } - final Dimension2D size = nativeGetNSImageSize(ptr); + AtomicReference<Dimension2D> sizeRef = new AtomicReference<>(); + execute(ptr -> { + sizeRef.set(nativeGetNSImageSize(ptr)); + }); + final Dimension2D size = sizeRef.get(); + if (size == null) { + return null; + } final int w = (int)size.getWidth(); final int h = (int)size.getHeight(); - - Dimension2D[] sizes - = nativeGetNSImageRepresentationSizes(ptr, - size.getWidth(), size.getHeight()); + AtomicReference<Dimension2D[]> repRef = new AtomicReference<>(); + execute(ptr -> { + repRef.set(nativeGetNSImageRepresentationSizes(ptr, size.getWidth(), + size.getHeight())); + }); + Dimension2D[] sizes = repRef.get(); return sizes == null || sizes.length < 2 ? new MultiResolutionCachedImage(w, h, (width, height) @@ -256,18 +268,18 @@ final BufferedImage bimg = new BufferedImage(dstWidth, dstHeight, BufferedImage.TYPE_INT_ARGB_PRE); final DataBufferInt dbi = (DataBufferInt)bimg.getRaster().getDataBuffer(); final int[] buffer = SunWritableRaster.stealData(dbi, 0); - nativeCopyNSImageIntoArray(ptr, buffer, srcWidth, srcHeight, dstWidth, dstHeight); + execute(ptr->nativeCopyNSImageIntoArray(ptr, buffer, srcWidth, srcHeight, dstWidth, dstHeight)); SunWritableRaster.markDirty(dbi); return bimg; } /** If nsImagePtr != 0 then scale this NSImage. @return *this* */ CImage resize(final double w, final double h) { - if (ptr != 0) nativeSetNSImageSize(ptr, w, h); + execute(ptr -> nativeSetNSImageSize(ptr, w, h)); return this; } void resizeRepresentations(double w, double h) { - if (ptr != 0) nativeResizeNSImageRepresentations(ptr, w, h); + execute(ptr -> nativeResizeNSImageRepresentations(ptr, w, h)); } }
--- a/src/macosx/classes/sun/lwawt/macosx/CMenuItem.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/macosx/CMenuItem.java Tue May 09 04:03:50 2017 +0100 @@ -113,7 +113,13 @@ */ public final void setImage(final java.awt.Image img) { CImage cimg = CImage.getCreator().createFromImage(img); - execute(ptr -> nativeSetImage(ptr, cimg == null ? 0L : cimg.ptr)); + execute(ptr -> { + if (cimg == null) { + nativeSetImage(ptr, 0L); + } else { + cimg.execute(imgPtr -> nativeSetImage(ptr, imgPtr)); + } + }); } /**
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformComponent.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformComponent.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, 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 @@ -44,6 +44,9 @@ super(0, true); } + /** + * Used by JAWT. + */ public long getPointer() { return ptr; } @@ -61,7 +64,7 @@ // translates values from the coordinate system of the top-level window // to the coordinate system of the content view final Insets insets = platformWindow.getPeer().getInsets(); - nativeSetBounds(getPointer(), x - insets.left, y - insets.top, w, h); + execute(ptr->nativeSetBounds(ptr, x - insets.left, y - insets.top, w, h)); } @Override
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java Tue May 09 04:03:50 2017 +0100 @@ -129,11 +129,6 @@ @Override public void setAlwaysOnTop(boolean value) {} - // This method should be properly implemented for applets. - // It returns null just as a stub. - @Override - public PlatformWindow getTopmostPlatformWindowUnderMouse() { return null; } - @Override public void updateFocusableWindowState() {}
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformLWWindow.java Tue May 09 04:03:50 2017 +0100 @@ -108,11 +108,6 @@ } @Override - public long getNSWindowPtr() { - return 0; - } - - @Override public SurfaceData getSurfaceData() { return null; } @@ -162,11 +157,6 @@ } @Override - public PlatformWindow getTopmostPlatformWindowUnderMouse(){ - return null; - } - - @Override public void setOpacity(float opacity) { }
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011, 2016, 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 @@ -27,6 +27,9 @@ import java.awt.*; import java.awt.geom.Rectangle2D; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; import sun.awt.CGraphicsConfig; import sun.awt.CGraphicsEnvironment; @@ -83,7 +86,7 @@ * Cocoa coordinates). */ public void setBounds(int x, int y, int width, int height) { - CWrapper.NSView.setFrame(ptr, x, y, width, height); + execute(ptr->CWrapper.NSView.setFrame(ptr, x, y, width, height)); } // REMIND: CGLSurfaceData expects top-level's size @@ -96,7 +99,7 @@ } public void setToolTip(String msg) { - CWrapper.NSView.setToolTip(ptr, msg); + execute(ptr -> CWrapper.NSView.setToolTip(ptr, msg)); } // ---------------------------------------------------------------------- @@ -147,18 +150,25 @@ } public void setAutoResizable(boolean toResize) { - nativeSetAutoResizable(this.getAWTView(), toResize); + execute(ptr -> nativeSetAutoResizable(ptr, toResize)); } public boolean isUnderMouse() { - return nativeIsViewUnderMouse(getAWTView()); + AtomicBoolean ref = new AtomicBoolean(); + execute(ptr -> { + ref.set(nativeIsViewUnderMouse(ptr)); + }); + return ref.get(); } public GraphicsDevice getGraphicsDevice() { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); CGraphicsEnvironment cge = (CGraphicsEnvironment)ge; - int displayID = nativeGetNSViewDisplayID(getAWTView()); - GraphicsDevice gd = cge.getScreenDevice(displayID); + AtomicInteger ref = new AtomicInteger(); + execute(ptr -> { + ref.set(nativeGetNSViewDisplayID(ptr)); + }); + GraphicsDevice gd = cge.getScreenDevice(ref.get()); if (gd == null) { // this could possibly happen during device removal // use the default screen device in this case @@ -168,8 +178,15 @@ } public Point getLocationOnScreen() { - Rectangle r = nativeGetLocationOnScreen(this.getAWTView()).getBounds(); - return new Point(r.x, r.y); + AtomicReference<Rectangle> ref = new AtomicReference<>(); + execute(ptr -> { + ref.set(nativeGetLocationOnScreen(ptr).getBounds()); + }); + Rectangle r = ref.get(); + if (r != null) { + return new Point(r.x, r.y); + } + return new Point(0, 0); } // ----------------------------------------------------------------------
--- a/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java Tue May 09 04:03:50 2017 +0100 @@ -31,12 +31,19 @@ import java.awt.peer.WindowPeer; import java.beans.*; import java.lang.reflect.InvocationTargetException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.atomic.AtomicReference; import java.util.List; import java.util.Objects; import javax.swing.*; import sun.awt.*; +import sun.awt.AWTAccessor.ComponentAccessor; +import sun.awt.AWTAccessor.WindowAccessor; import sun.java2d.SurfaceData; import sun.java2d.opengl.CGLSurfaceData; import sun.lwawt.*; @@ -62,9 +69,9 @@ private static native void nativeSetEnabled(long nsWindowPtr, boolean isEnabled); private static native void nativeSynthesizeMouseEnteredExitedEvents(); private static native void nativeDispose(long nsWindowPtr); - private static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse(); private static native void nativeEnterFullScreenMode(long nsWindowPtr); private static native void nativeExitFullScreenMode(long nsWindowPtr); + static native CPlatformWindow nativeGetTopmostPlatformWindowUnderMouse(); // Loger to report issues happened during execution but that do not affect functionality private static final PlatformLogger logger = PlatformLogger.getLogger("sun.lwawt.macosx.CPlatformWindow"); @@ -178,16 +185,16 @@ c.setStyleBits(FULLSCREENABLE, Boolean.parseBoolean(value.toString())); }}, new Property<CPlatformWindow>(WINDOW_SHADOW_REVALIDATE_NOW) { public void applyProperty(final CPlatformWindow c, final Object value) { - nativeRevalidateNSWindowShadow(c.getNSWindowPtr()); + c.execute(ptr -> nativeRevalidateNSWindowShadow(ptr)); }}, new Property<CPlatformWindow>(WINDOW_DOCUMENT_FILE) { public void applyProperty(final CPlatformWindow c, final Object value) { if (value == null || !(value instanceof java.io.File)) { - nativeSetNSWindowRepresentedFilename(c.getNSWindowPtr(), null); + c.execute(ptr->nativeSetNSWindowRepresentedFilename(ptr, null)); return; } final String filename = ((java.io.File)value).getAbsolutePath(); - nativeSetNSWindowRepresentedFilename(c.getNSWindowPtr(), filename); + c.execute(ptr->nativeSetNSWindowRepresentedFilename(ptr, filename)); }} }) { public CPlatformWindow convertJComponentToTarget(final JRootPane p) { @@ -205,6 +212,8 @@ private volatile boolean isFullScreenMode; private boolean isFullScreenAnimationOn; + private volatile boolean isIconifyAnimationActive; + private Window target; private LWWindowPeer peer; protected CPlatformView contentView; @@ -232,7 +241,6 @@ contentView = createContentView(); contentView.initialize(peer, responder); - final long ownerPtr = owner != null ? owner.getNSWindowPtr() : 0L; Rectangle bounds; if (!IS(DECORATED, styleBits)) { // For undecorated frames the move/resize event does not come if the frame is centered on the screen @@ -241,9 +249,21 @@ } else { bounds = _peer.constrainBounds(_target.getBounds()); } - final long nativeWindowPtr = nativeCreateNSWindow(contentView.getAWTView(), - ownerPtr, styleBits, bounds.x, bounds.y, bounds.width, bounds.height); - setPtr(nativeWindowPtr); + AtomicLong ref = new AtomicLong(); + contentView.execute(viewPtr -> { + if (owner != null) { + owner.execute(ownerPtr -> { + ref.set(nativeCreateNSWindow(viewPtr, ownerPtr, styleBits, + bounds.x, bounds.y, + bounds.width, bounds.height)); + }); + } else { + ref.set(nativeCreateNSWindow(viewPtr, 0, + styleBits, bounds.x, bounds.y, + bounds.width, bounds.height)); + } + }); + setPtr(ref.get()); if (target instanceof javax.swing.RootPaneContainer) { final javax.swing.JRootPane rootpane = ((javax.swing.RootPaneContainer)target).getRootPane(); @@ -405,30 +425,31 @@ // this is the counter-point to -[CWindow _nativeSetStyleBit:] private void setStyleBits(final int mask, final boolean value) { - nativeSetNSWindowStyleBits(getNSWindowPtr(), mask, value ? mask : 0); + execute(ptr -> nativeSetNSWindowStyleBits(ptr, mask, value ? mask : 0)); } private native void _toggleFullScreenMode(final long model); public void toggleFullScreen() { - _toggleFullScreenMode(getNSWindowPtr()); + execute(this::_toggleFullScreenMode); } @Override // PlatformWindow public void setMenuBar(MenuBar mb) { - final long nsWindowPtr = getNSWindowPtr(); CMenuBar mbPeer = (CMenuBar)LWToolkit.targetToPeer(mb); - if (mbPeer != null) { - mbPeer.execute(ptr -> nativeSetNSWindowMenuBar(nsWindowPtr, ptr)); - } else { - nativeSetNSWindowMenuBar(nsWindowPtr, 0); - } + execute(nsWindowPtr->{ + if (mbPeer != null) { + mbPeer.execute(ptr -> nativeSetNSWindowMenuBar(nsWindowPtr, ptr)); + } else { + nativeSetNSWindowMenuBar(nsWindowPtr, 0); + } + }); } @Override // PlatformWindow public void dispose() { contentView.dispose(); - nativeDispose(getNSWindowPtr()); + execute(CPlatformWindow::nativeDispose); CPlatformWindow.super.dispose(); } @@ -441,7 +462,11 @@ @Override // PlatformWindow public Insets getInsets() { - return nativeGetNSWindowInsets(getNSWindowPtr()); + AtomicReference<Insets> ref = new AtomicReference<>(); + execute(ptr -> { + ref.set(nativeGetNSWindowInsets(ptr)); + }); + return ref.get() != null ? ref.get() : new Insets(0, 0, 0, 0); } @Override // PlatformWindow @@ -468,12 +493,18 @@ @Override // PlatformWindow public void setBounds(int x, int y, int w, int h) { // assert CThreading.assertEventQueue(); - nativeSetNSWindowBounds(getNSWindowPtr(), x, y, w, h); + execute(ptr -> nativeSetNSWindowBounds(ptr, x, y, w, h)); } private boolean isMaximized() { - return undecorated ? this.normalBounds != null - : CWrapper.NSWindow.isZoomed(getNSWindowPtr()); + if (undecorated) { + return this.normalBounds != null; + } + AtomicBoolean ref = new AtomicBoolean(); + execute(ptr -> { + ref.set(CWrapper.NSWindow.isZoomed(ptr)); + }); + return ref.get(); } private void maximize() { @@ -481,7 +512,7 @@ return; } if (!undecorated) { - CWrapper.NSWindow.zoom(getNSWindowPtr()); + execute(CWrapper.NSWindow::zoom); } else { deliverZoom(true); @@ -505,7 +536,7 @@ return; } if (!undecorated) { - CWrapper.NSWindow.zoom(getNSWindowPtr()); + execute(CWrapper.NSWindow::zoom); } else { deliverZoom(false); @@ -521,8 +552,6 @@ @Override // PlatformWindow public void setVisible(boolean visible) { - final long nsWindowPtr = getNSWindowPtr(); - // Configure stuff updateIconImages(); updateFocusabilityForAutoRequestFocus(false); @@ -534,30 +563,44 @@ if (blocker == null || !visible) { // If it ain't blocked, or is being hidden, go regular way if (visible) { - CWrapper.NSWindow.makeFirstResponder(nsWindowPtr, contentView.getAWTView()); + contentView.execute(viewPtr -> { + execute(ptr -> CWrapper.NSWindow.makeFirstResponder(ptr, + viewPtr)); + }); boolean isPopup = (target.getType() == Window.Type.POPUP); - if (isPopup) { - // Popups in applets don't activate applet's process - CWrapper.NSWindow.orderFrontRegardless(nsWindowPtr); - } else { - CWrapper.NSWindow.orderFront(nsWindowPtr); - } + execute(ptr -> { + if (isPopup) { + // Popups in applets don't activate applet's process + CWrapper.NSWindow.orderFrontRegardless(ptr); + } else { + CWrapper.NSWindow.orderFront(ptr); + } - boolean isKeyWindow = CWrapper.NSWindow.isKeyWindow(nsWindowPtr); - if (!isKeyWindow) { - CWrapper.NSWindow.makeKeyWindow(nsWindowPtr); - } + boolean isKeyWindow = CWrapper.NSWindow.isKeyWindow(ptr); + if (!isKeyWindow) { + CWrapper.NSWindow.makeKeyWindow(ptr); + } + }); } else { - // immediately hide the window - CWrapper.NSWindow.orderOut(nsWindowPtr); - // process the close - CWrapper.NSWindow.close(nsWindowPtr); + execute(ptr->{ + // immediately hide the window + CWrapper.NSWindow.orderOut(ptr); + // process the close + CWrapper.NSWindow.close(ptr); + }); } } else { // otherwise, put it in a proper z-order - CWrapper.NSWindow.orderWindow(nsWindowPtr, CWrapper.NSWindow.NSWindowBelow, - ((CPlatformWindow)blocker.getPlatformWindow()).getNSWindowPtr()); + CPlatformWindow bw + = (CPlatformWindow) blocker.getPlatformWindow(); + bw.execute(blockerPtr -> { + execute(ptr -> { + CWrapper.NSWindow.orderWindow(ptr, + CWrapper.NSWindow.NSWindowBelow, + blockerPtr); + }); + }); } this.visible = visible; @@ -576,7 +619,7 @@ } switch (frameState) { case Frame.ICONIFIED: - CWrapper.NSWindow.miniaturize(nsWindowPtr); + execute(CWrapper.NSWindow::miniaturize); break; case Frame.MAXIMIZED_BOTH: maximize(); @@ -598,7 +641,11 @@ if (visible) { // Order myself above my parent if (owner != null && owner.isVisible()) { - CWrapper.NSWindow.orderWindow(nsWindowPtr, CWrapper.NSWindow.NSWindowAbove, owner.getNSWindowPtr()); + owner.execute(ownerPtr -> { + execute(ptr -> { + CWrapper.NSWindow.orderWindow(ptr, CWrapper.NSWindow.NSWindowAbove, ownerPtr); + }); + }); applyWindowLevel(target); } @@ -608,7 +655,11 @@ if (p instanceof LWWindowPeer) { CPlatformWindow pw = (CPlatformWindow)((LWWindowPeer)p).getPlatformWindow(); if (pw != null && pw.isVisible()) { - CWrapper.NSWindow.orderWindow(pw.getNSWindowPtr(), CWrapper.NSWindow.NSWindowAbove, nsWindowPtr); + pw.execute(childPtr -> { + execute(ptr -> { + CWrapper.NSWindow.orderWindow(childPtr, CWrapper.NSWindow.NSWindowAbove, ptr); + }); + }); pw.applyWindowLevel(w); } } @@ -624,25 +675,22 @@ @Override // PlatformWindow public void setTitle(String title) { - nativeSetNSWindowTitle(getNSWindowPtr(), title); + execute(ptr -> nativeSetNSWindowTitle(ptr, title)); } // Should be called on every window key property change. @Override // PlatformWindow public void updateIconImages() { - final long nsWindowPtr = getNSWindowPtr(); final CImage cImage = getImageForTarget(); - nativeSetNSWindowMinimizedIcon(nsWindowPtr, cImage == null ? 0L : cImage.ptr); - } - - public long getNSWindowPtr() { - final long nsWindowPtr = ptr; - if (nsWindowPtr == 0L) { - if(logger.isLoggable(PlatformLogger.Level.FINE)) { - logger.fine("NSWindow already disposed?", new Exception("Pointer to native NSWindow is invalid.")); + execute(ptr -> { + if (cImage == null) { + nativeSetNSWindowMinimizedIcon(ptr, 0L); + } else { + cImage.execute(imagePtr -> { + nativeSetNSWindowMinimizedIcon(ptr, imagePtr); + }); } - } - return nsWindowPtr; + }); } public SurfaceData getSurfaceData() { @@ -651,13 +699,11 @@ @Override // PlatformWindow public void toBack() { - final long nsWindowPtr = getNSWindowPtr(); - nativePushNSWindowToBack(nsWindowPtr); + execute(CPlatformWindow::nativePushNSWindowToBack); } @Override // PlatformWindow public void toFront() { - final long nsWindowPtr = getNSWindowPtr(); LWCToolkit lwcToolkit = (LWCToolkit) Toolkit.getDefaultToolkit(); Window w = DefaultKeyboardFocusManager.getCurrentKeyboardFocusManager().getActiveWindow(); if( w != null && w.getPeer() != null @@ -666,7 +712,7 @@ lwcToolkit.activateApplicationIgnoringOtherApps(); } updateFocusabilityForAutoRequestFocus(false); - nativePushNSWindowToFront(nsWindowPtr); + execute(CPlatformWindow::nativePushNSWindowToFront); updateFocusabilityForAutoRequestFocus(true); } @@ -677,7 +723,7 @@ @Override public void setSizeConstraints(int minW, int minH, int maxW, int maxH) { - nativeSetNSWindowMinMax(getNSWindowPtr(), minW, minH, maxW, maxH); + execute(ptr -> nativeSetNSWindowMinMax(ptr, minW, minH, maxW, maxH)); } @Override @@ -694,19 +740,22 @@ @Override public boolean requestWindowFocus() { - - long ptr = getNSWindowPtr(); - if (CWrapper.NSWindow.canBecomeMainWindow(ptr)) { - CWrapper.NSWindow.makeMainWindow(ptr); - } - CWrapper.NSWindow.makeKeyAndOrderFront(ptr); + execute(ptr -> { + if (CWrapper.NSWindow.canBecomeMainWindow(ptr)) { + CWrapper.NSWindow.makeMainWindow(ptr); + } + CWrapper.NSWindow.makeKeyAndOrderFront(ptr); + }); return true; } @Override public boolean isActive() { - long ptr = getNSWindowPtr(); - return CWrapper.NSWindow.isKeyWindow(ptr); + AtomicBoolean ref = new AtomicBoolean(); + execute(ptr -> { + ref.set(CWrapper.NSWindow.isKeyWindow(ptr)); + }); + return ref.get(); } @Override @@ -726,27 +775,23 @@ setStyleBits(ALWAYS_ON_TOP, isAlwaysOnTop); } - public PlatformWindow getTopmostPlatformWindowUnderMouse(){ - return CPlatformWindow.nativeGetTopmostPlatformWindowUnderMouse(); - } - @Override public void setOpacity(float opacity) { - CWrapper.NSWindow.setAlphaValue(getNSWindowPtr(), opacity); + execute(ptr -> CWrapper.NSWindow.setAlphaValue(ptr, opacity)); } @Override public void setOpaque(boolean isOpaque) { - CWrapper.NSWindow.setOpaque(getNSWindowPtr(), isOpaque); + execute(ptr -> CWrapper.NSWindow.setOpaque(ptr, isOpaque)); boolean isTextured = (peer == null) ? false : peer.isTextured(); if (!isTextured) { if (!isOpaque) { - CWrapper.NSWindow.setBackgroundColor(getNSWindowPtr(), 0); + execute(ptr -> CWrapper.NSWindow.setBackgroundColor(ptr, 0)); } else if (peer != null) { Color color = peer.getBackground(); if (color != null) { int rgb = color.getRGB(); - CWrapper.NSWindow.setBackgroundColor(getNSWindowPtr(), rgb); + execute(ptr->CWrapper.NSWindow.setBackgroundColor(ptr, rgb)); } } } @@ -759,12 +804,12 @@ @Override public void enterFullScreenMode() { isFullScreenMode = true; - nativeEnterFullScreenMode(getNSWindowPtr()); + execute(CPlatformWindow::nativeEnterFullScreenMode); } @Override public void exitFullScreenMode() { - nativeExitFullScreenMode(getNSWindowPtr()); + execute(CPlatformWindow::nativeExitFullScreenMode); isFullScreenMode = false; } @@ -783,7 +828,6 @@ int prevWindowState = peer.getState(); if (prevWindowState == windowState) return; - final long nsWindowPtr = getNSWindowPtr(); if ((windowState & Frame.ICONIFIED) != 0) { // Treat all state bit masks with ICONIFIED bit as ICONIFIED state. windowState = Frame.ICONIFIED; @@ -795,18 +839,18 @@ // the zoom call toggles between the normal and the max states unmaximize(); } - CWrapper.NSWindow.miniaturize(nsWindowPtr); + execute(CWrapper.NSWindow::miniaturize); break; case Frame.MAXIMIZED_BOTH: if (prevWindowState == Frame.ICONIFIED) { // let's return into the normal states first - CWrapper.NSWindow.deminiaturize(nsWindowPtr); + execute(CWrapper.NSWindow::deminiaturize); } maximize(); break; case Frame.NORMAL: if (prevWindowState == Frame.ICONIFIED) { - CWrapper.NSWindow.deminiaturize(nsWindowPtr); + execute(CWrapper.NSWindow::deminiaturize); } else if (prevWindowState == Frame.MAXIMIZED_BOTH) { // the zoom call toggles between the normal and the max states unmaximize(); @@ -826,12 +870,12 @@ return; } - nativeSetEnabled(getNSWindowPtr(), !blocked); + execute(ptr -> nativeSetEnabled(ptr, !blocked)); checkBlockingAndOrder(); } public final void invalidateShadow(){ - nativeRevalidateNSWindowShadow(getNSWindowPtr()); + execute(ptr -> nativeRevalidateNSWindowShadow(ptr)); } // ---------------------------------------------------------------------- @@ -950,6 +994,9 @@ if (peer != null) { peer.notifyIconify(iconify); } + if (iconify) { + isIconifyAnimationActive = false; + } } private void deliverZoom(final boolean isZoomed) { @@ -1011,44 +1058,107 @@ pWindow.orderAboveSiblings(); - final long nsWindowPtr = pWindow.getNSWindowPtr(); - CWrapper.NSWindow.orderFrontRegardless(nsWindowPtr); - CWrapper.NSWindow.makeKeyAndOrderFront(nsWindowPtr); - CWrapper.NSWindow.makeMainWindow(nsWindowPtr); + pWindow.execute(ptr -> { + CWrapper.NSWindow.orderFrontRegardless(ptr); + CWrapper.NSWindow.makeKeyAndOrderFront(ptr); + CWrapper.NSWindow.makeMainWindow(ptr); + }); + return true; + } - return true; + private boolean isIconified() { + boolean isIconified = false; + if (target instanceof Frame) { + int state = ((Frame)target).getExtendedState(); + if ((state & Frame.ICONIFIED) != 0) { + isIconified = true; + } + } + return isIconifyAnimationActive || isIconified; + } + + private boolean isOneOfOwnersOrSelf(CPlatformWindow window) { + while (window != null) { + if (this == window) { + return true; + } + window = window.owner; + } + return false; + } + + private CPlatformWindow getRootOwner() { + CPlatformWindow rootOwner = this; + while (rootOwner.owner != null) { + rootOwner = rootOwner.owner; + } + return rootOwner; } private void orderAboveSiblings() { - if (owner == null) { - return; + // Recursively pop up the windows from the very bottom, (i.e. root owner) so that + // the windows are ordered above their nearest owner; ancestors of the window, + // which is going to become 'main window', are placed above their siblings. + CPlatformWindow rootOwner = getRootOwner(); + if (rootOwner.isVisible() && !rootOwner.isIconified()) { + rootOwner.execute(CWrapper.NSWindow::orderFront); } + // Do not order child windows of iconified owner. + if (!rootOwner.isIconified()) { + final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor(); + orderAboveSiblingsImpl(windowAccessor.getOwnedWindows(rootOwner.target)); + } + } + + private void orderAboveSiblingsImpl(Window[] windows) { + ArrayList<Window> childWindows = new ArrayList<Window>(); + + final ComponentAccessor componentAccessor = AWTAccessor.getComponentAccessor(); + final WindowAccessor windowAccessor = AWTAccessor.getWindowAccessor(); - // NOTE: the logic will fail if we have a hierarchy like: - // visible root owner - // invisible owner - // visible dialog - // However, this is an unlikely scenario for real life apps - if (owner.isVisible()) { - // Recursively pop up the windows from the very bottom so that only - // the very top-most one becomes the main window - owner.orderAboveSiblings(); - - // Order the window to front of the stack of child windows - final long nsWindowSelfPtr = getNSWindowPtr(); - final long nsWindowOwnerPtr = owner.getNSWindowPtr(); - CWrapper.NSWindow.orderFront(nsWindowOwnerPtr); - CWrapper.NSWindow.orderWindow(nsWindowSelfPtr, CWrapper.NSWindow.NSWindowAbove, nsWindowOwnerPtr); + // Go through the list of windows and perform ordering. + for (Window w : windows) { + boolean iconified = false; + final Object p = componentAccessor.getPeer(w); + if (p instanceof LWWindowPeer) { + CPlatformWindow pw = (CPlatformWindow)((LWWindowPeer)p).getPlatformWindow(); + iconified = isIconified(); + if (pw != null && pw.isVisible() && !iconified) { + // If the window is one of ancestors of 'main window' or is going to become main by itself, + // the window should be ordered above its siblings; otherwise the window is just ordered + // above its nearest parent. + if (pw.isOneOfOwnersOrSelf(this)) { + pw.execute(CWrapper.NSWindow::orderFront); + } else { + pw.owner.execute(ownerPtr -> { + pw.execute(ptr -> { + CWrapper.NSWindow.orderWindow(ptr, CWrapper.NSWindow.NSWindowAbove, ownerPtr); + }); + }); + } + pw.applyWindowLevel(w); + } + } + // Retrieve the child windows for each window from the list except iconified ones + // and store them for future use. + // Note: we collect data about child windows even for invisible owners, since they may have + // visible children. + if (!iconified) { + childWindows.addAll(Arrays.asList(windowAccessor.getOwnedWindows(w))); + } } - - applyWindowLevel(target); + // If some windows, which have just been ordered, have any child windows, let's start new iteration + // and order these child windows. + if (!childWindows.isEmpty()) { + orderAboveSiblingsImpl(childWindows.toArray(new Window[0])); + } } protected void applyWindowLevel(Window target) { if (target.isAlwaysOnTop() && target.getType() != Window.Type.POPUP) { - CWrapper.NSWindow.setLevel(getNSWindowPtr(), CWrapper.NSWindow.NSFloatingWindowLevel); + execute(ptr->CWrapper.NSWindow.setLevel(ptr, CWrapper.NSWindow.NSFloatingWindowLevel)); } else if (target.getType() == Window.Type.POPUP) { - CWrapper.NSWindow.setLevel(getNSWindowPtr(), CWrapper.NSWindow.NSPopUpMenuWindowLevel); + execute(ptr->CWrapper.NSWindow.setLevel(ptr, CWrapper.NSWindow.NSPopUpMenuWindowLevel)); } } @@ -1056,6 +1166,10 @@ // NATIVE CALLBACKS // ---------------------------------------------------------------------- + private void windowWillMiniaturize() { + isIconifyAnimationActive = true; + } + private void windowDidBecomeMain() { assert CThreading.assertAppKit();
--- a/src/macosx/classes/sun/lwawt/macosx/CRobot.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/macosx/CRobot.java Tue May 09 04:03:50 2017 +0100 @@ -78,7 +78,7 @@ @Override public void mousePress(int buttons) { mouseButtonsState |= buttons; - + checkMousePos(); mouseEvent(fDevice.getCGDisplayID(), mouseLastX, mouseLastY, buttons, true, false); } @@ -92,11 +92,40 @@ @Override public void mouseRelease(int buttons) { mouseButtonsState &= ~buttons; - + checkMousePos(); mouseEvent(fDevice.getCGDisplayID(), mouseLastX, mouseLastY, buttons, false, false); } + /** + * Set unknown mouse location, if needed. + */ + private void checkMousePos() { + if (mouseLastX == MOUSE_LOCATION_UNKNOWN || + mouseLastY == MOUSE_LOCATION_UNKNOWN) { + + Rectangle deviceBounds = fDevice.getDefaultConfiguration().getBounds(); + Point mousePos = CCursorManager.getInstance().getCursorPosition(); + + if (mousePos.x < deviceBounds.x) { + mousePos.x = deviceBounds.x; + } + else if (mousePos.x > deviceBounds.x + deviceBounds.width) { + mousePos.x = deviceBounds.x + deviceBounds.width; + } + + if (mousePos.y < deviceBounds.y) { + mousePos.y = deviceBounds.y; + } + else if (mousePos.y > deviceBounds.y + deviceBounds.height) { + mousePos.y = deviceBounds.y + deviceBounds.height; + } + + mouseLastX = mousePos.x; + mouseLastY = mousePos.y; + } + } + @Override public native void mouseWheel(int wheelAmt);
--- a/src/macosx/classes/sun/lwawt/macosx/CTrayIcon.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/macosx/CTrayIcon.java Tue May 09 04:03:50 2017 +0100 @@ -36,6 +36,7 @@ import java.awt.peer.TrayIconPeer; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; +import java.util.concurrent.atomic.AtomicReference; public class CTrayIcon extends CFRetainedResource implements TrayIconPeer { private TrayIcon target; @@ -88,10 +89,6 @@ return nativeCreate(); } - private long getModel() { - return ptr; - } - private native long nativeCreate(); //invocation from the AWTTrayIcon.m @@ -154,7 +151,7 @@ @Override public void setToolTip(String tooltip) { - nativeSetToolTip(getModel(), tooltip); + execute(ptr -> nativeSetToolTip(ptr, tooltip)); } //adds tooltip to the NSStatusBar's NSButton. @@ -183,7 +180,12 @@ } CImage cimage = CImage.getCreator().createFromImage(image); - setNativeImage(getModel(), cimage.ptr, target.isImageAutoSize()); + boolean imageAutoSize = target.isImageAutoSize(); + cimage.execute(imagePtr -> { + execute(ptr -> { + setNativeImage(ptr, imagePtr, imageAutoSize); + }); + }); } private native void setNativeImage(final long model, final long nsimage, final boolean autosize); @@ -363,7 +365,14 @@ private void showMessageDialog() { Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); - Point2D iconLoc = nativeGetIconLocation(getModel()); + AtomicReference<Point2D> ref = new AtomicReference<>(); + execute(ptr -> { + ref.set(nativeGetIconLocation(ptr)); + }); + Point2D iconLoc = ref.get(); + if (iconLoc == null) { + return; + } int dialogY = (int)iconLoc.getY(); int dialogX = (int)iconLoc.getX();
--- a/src/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/macosx/CViewPlatformEmbeddedFrame.java Tue May 09 04:03:50 2017 +0100 @@ -74,13 +74,13 @@ @Override public void dispose() { - CWrapper.NSView.removeFromSuperview(view.getAWTView()); + view.execute(CWrapper.NSView::removeFromSuperview); view.dispose(); } @Override public void setVisible(boolean visible) { - CWrapper.NSView.setHidden(view.getAWTView(), !visible); + view.execute(ptr -> CWrapper.NSView.setHidden(ptr, !visible)); } @Override @@ -144,11 +144,6 @@ } @Override - public PlatformWindow getTopmostPlatformWindowUnderMouse() { - return null; - } - - @Override public void updateFocusableWindowState() { }
--- a/src/macosx/classes/sun/lwawt/macosx/CWarningWindow.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/macosx/CWarningWindow.java Tue May 09 04:03:50 2017 +0100 @@ -219,14 +219,14 @@ @Override public void setVisible(boolean visible) { synchronized (lock) { - final long nsWindowPtr = getNSWindowPtr(); - - // Actually show or hide the window - if (visible) { - CWrapper.NSWindow.orderFront(nsWindowPtr); - } else { - CWrapper.NSWindow.orderOut(nsWindowPtr); - } + execute(ptr -> { + // Actually show or hide the window + if (visible) { + CWrapper.NSWindow.orderFront(ptr); + } else { + CWrapper.NSWindow.orderOut(ptr); + } + }); this.visible = visible; @@ -234,8 +234,13 @@ if (visible) { // Order myself above my parent if (owner != null && owner.isVisible()) { - CWrapper.NSWindow.orderWindow(nsWindowPtr, - CWrapper.NSWindow.NSWindowAbove, owner.getNSWindowPtr()); + owner.execute(ownerPtr -> { + execute(ptr -> { + CWrapper.NSWindow.orderWindow(ptr, + CWrapper.NSWindow.NSWindowAbove, + ownerPtr); + }); + }); // do not allow security warning to be obscured by other windows applyWindowLevel(ownerWindow);
--- a/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java Tue May 09 04:03:50 2017 +0100 @@ -917,4 +917,9 @@ !path.endsWith("/") && !path.endsWith("."); } + + @Override + protected PlatformWindow getPlatformWindowUnderMouse() { + return CPlatformWindow.nativeGetTopmostPlatformWindowUnderMouse(); + } }
--- a/src/macosx/native/sun/awt/AWTSurfaceLayers.h Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/native/sun/awt/AWTSurfaceLayers.h Tue May 09 04:03:50 2017 +0100 @@ -41,6 +41,8 @@ CALayer *windowLayer; } +@property (retain) CALayer *windowLayer; + - (id) initWithWindowLayer: (CALayer *)windowLayer; - (void) setBounds: (CGRect)rect;
--- a/src/macosx/native/sun/awt/AWTSurfaceLayers.m Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/native/sun/awt/AWTSurfaceLayers.m Tue May 09 04:03:50 2017 +0100 @@ -38,11 +38,15 @@ self = [super init]; if (self == nil) return self; - windowLayer = aWindowLayer; + self.windowLayer = aWindowLayer; return self; } +- (void) dealloc { + self.windowLayer = nil; + [super dealloc]; +} - (CALayer *) layer { return layer;
--- a/src/macosx/native/sun/awt/AWTWindow.m Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/native/sun/awt/AWTWindow.m Tue May 09 04:03:50 2017 +0100 @@ -326,10 +326,44 @@ return [window isKindOfClass: [AWTWindow_Panel class]] || [window isKindOfClass: [AWTWindow_Normal class]]; } +// Retrieves the list of possible window layers (levels) ++ (NSArray*) getWindowLayers { + static NSArray *windowLayers; + static dispatch_once_t token; + + // Initialize the list of possible window layers + dispatch_once(&token, ^{ + // The layers are ordered from front to back, (i.e. the toppest one is the first) + windowLayers = [NSArray arrayWithObjects: + [NSNumber numberWithInt:CGWindowLevelForKey(kCGPopUpMenuWindowLevelKey)], + [NSNumber numberWithInt:CGWindowLevelForKey(kCGFloatingWindowLevelKey)], + [NSNumber numberWithInt:CGWindowLevelForKey(kCGNormalWindowLevelKey)], + nil + ]; + [windowLayers retain]; + }); + return windowLayers; +} + + // returns id for the topmost window under mouse + (NSInteger) getTopmostWindowUnderMouseID { NSInteger result = -1; - + + NSArray *windowLayers = [AWTWindow getWindowLayers]; + // Looking for the window under mouse starting from the toppest layer + for (NSNumber *layer in windowLayers) { + result = [AWTWindow getTopmostWindowUnderMouseIDImpl:[layer integerValue]]; + if (result != -1) { + break; + } + } + return result; +} + ++ (NSInteger) getTopmostWindowUnderMouseIDImpl:(NSInteger)windowLayer { + NSInteger result = -1; + NSRect screenRect = [[NSScreen mainScreen] frame]; NSPoint nsMouseLocation = [NSEvent mouseLocation]; CGPoint cgMouseLocation = CGPointMake(nsMouseLocation.x, screenRect.size.height - nsMouseLocation.y); @@ -338,7 +372,7 @@ for (NSDictionary *window in windows) { NSInteger layer = [[window objectForKey:(id)kCGWindowLayer] integerValue]; - if (layer == 0) { + if (layer == windowLayer) { CGRect rect; CGRectMakeWithDictionaryRepresentation((CFDictionaryRef)[window objectForKey:(id)kCGWindowBounds], &rect); if (CGRectContainsPoint(rect, cgMouseLocation)) { @@ -614,6 +648,14 @@ AWT_ASSERT_APPKIT_THREAD; self.isMinimizing = YES; + + JNIEnv *env = [ThreadUtilities getJNIEnv]; + jobject platformWindow = [self.javaPlatformWindow jObjectWithEnv:env]; + if (platformWindow != NULL) { + static JNF_MEMBER_CACHE(jm_windowWillMiniaturize, jc_CPlatformWindow, "windowWillMiniaturize", "()V"); + JNFCallVoidMethod(env, platformWindow, jm_windowWillMiniaturize); + (*env)->DeleteLocalRef(env, platformWindow); + } // Excplicitly make myself a key window to avoid possible // negative visual effects during iconify operation [self.nsWindow makeKeyAndOrderFront:self.nsWindow]; @@ -1255,15 +1297,16 @@ JNICALL Java_sun_lwawt_macosx_CPlatformWindow_nativeGetTopmostPlatformWindowUnderMouse (JNIEnv *env, jclass clazz) { - jobject topmostWindowUnderMouse = nil; + __block jobject topmostWindowUnderMouse = nil; JNF_COCOA_ENTER(env); - AWT_ASSERT_APPKIT_THREAD; - AWTWindow *awtWindow = [AWTWindow getTopmostWindowUnderMouse]; - if (awtWindow != nil) { - topmostWindowUnderMouse = [awtWindow.javaPlatformWindow jObject]; - } + [ThreadUtilities performOnMainThreadWaiting:YES block:^{ + AWTWindow *awtWindow = [AWTWindow getTopmostWindowUnderMouse]; + if (awtWindow != nil) { + topmostWindowUnderMouse = [awtWindow.javaPlatformWindow jObject]; + } + }]; JNF_COCOA_EXIT(env);
--- a/src/macosx/native/sun/awt/CCursorManager.m Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/native/sun/awt/CCursorManager.m Tue May 09 04:03:50 2017 +0100 @@ -118,13 +118,11 @@ JNF_COCOA_ENTER(env); - __block NSPoint pt = NSZeroPoint; - - [ThreadUtilities performOnMainThreadWaiting:YES block:^(){ - pt = ConvertNSScreenPoint(env, [NSEvent mouseLocation]); - }]; - - jpt = NSToJavaPoint(env, pt); + CGEventRef event = CGEventCreate(NULL); + CGPoint globalPos = CGEventGetLocation(event); + CFRelease(event); + + jpt = NSToJavaPoint(env, globalPos); JNF_COCOA_EXIT(env);
--- a/src/macosx/native/sun/awt/CRobot.m Tue May 09 03:09:51 2017 +0100 +++ b/src/macosx/native/sun/awt/CRobot.m Tue May 09 04:03:50 2017 +0100 @@ -146,47 +146,10 @@ // This is the native method called when Robot mouse events occur. // The CRobot tracks the mouse position, and which button was - // pressed. If the mouse position is unknown it is obtained from - // CGEvents. The peer also tracks the mouse button desired state, + // pressed. The peer also tracks the mouse button desired state, // the appropriate key modifier state, and whether the mouse action // is simply a mouse move with no mouse button state changes. - CGError err = kCGErrorSuccess; - - CGRect globalDeviceBounds = CGDisplayBounds(displayID); - - // Set unknown mouse location, if needed. - if ((mouseLastX == sun_lwawt_macosx_CRobot_MOUSE_LOCATION_UNKNOWN) || - (mouseLastY == sun_lwawt_macosx_CRobot_MOUSE_LOCATION_UNKNOWN)) - { - CGEventRef event = CGEventCreate(NULL); - if (event == NULL) { - return; - } - - CGPoint globalPos = CGEventGetLocation(event); - CFRelease(event); - - // Normalize the coords within this display device, as - // per Robot rules. - if (globalPos.x < CGRectGetMinX(globalDeviceBounds)) { - globalPos.x = CGRectGetMinX(globalDeviceBounds); - } - else if (globalPos.x > CGRectGetMaxX(globalDeviceBounds)) { - globalPos.x = CGRectGetMaxX(globalDeviceBounds); - } - - if (globalPos.y < CGRectGetMinY(globalDeviceBounds)) { - globalPos.y = CGRectGetMinY(globalDeviceBounds); - } - else if (globalPos.y > CGRectGetMaxY(globalDeviceBounds)) { - globalPos.y = CGRectGetMaxY(globalDeviceBounds); - } - - mouseLastX = (jint)globalPos.x; - mouseLastY = (jint)globalPos.y; - } - // volatile, otherwise it warns that it might be clobbered by 'longjmp' volatile CGPoint point;
--- a/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_ko.properties Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/com/sun/java/swing/plaf/windows/resources/windows_ko.properties Tue May 09 04:03:50 2017 +0100 @@ -38,7 +38,7 @@ FileChooser.viewMenuButtonToolTipText = \uBCF4\uAE30 \uBA54\uB274 FileChooser.viewMenuButtonAccessibleName = \uBCF4\uAE30 \uBA54\uB274 FileChooser.detailsViewActionLabel.textAndMnemonic=\uC138\uBD80\uC815\uBCF4 -FileChooser.refreshActionLabel.textAndMnemonic=\uC0C8\uB85C \uACE0\uCE68 +FileChooser.refreshActionLabel.textAndMnemonic=\uC0C8\uB85C\uACE0\uCE68 FileChooser.viewMenuLabel.textAndMnemonic=\uBCF4\uAE30 FileChooser.fileNameHeader.textAndMnemonic=\uC774\uB984 FileChooser.fileSizeHeader.textAndMnemonic=\uD06C\uAE30
--- a/src/share/classes/com/sun/jndi/ldap/pool/Connections.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/com/sun/jndi/ldap/pool/Connections.java Tue May 09 04:03:50 2017 +0100 @@ -27,7 +27,6 @@ import java.util.ArrayList; // JDK 1.2 import java.util.List; -import java.util.Iterator; import java.lang.ref.Reference; import java.lang.ref.SoftReference; @@ -290,23 +289,28 @@ * @param threshold an entry idle since this time has expired. * @return true if no more connections in list */ - synchronized boolean expire(long threshold) { - Iterator<ConnectionDesc> iter = conns.iterator(); - ConnectionDesc entry; - while (iter.hasNext()) { - entry = iter.next(); + boolean expire(long threshold) { + List<ConnectionDesc> clonedConns; + synchronized(this) { + clonedConns = new ArrayList<>(conns); + } + List<ConnectionDesc> expired = new ArrayList<>(); + + for (ConnectionDesc entry : clonedConns) { + d("expire(): ", entry); if (entry.expire(threshold)) { - d("expire(): removing ", entry); - td("Expired ", entry); - - iter.remove(); // remove from pool - - // Don't need to call notify() because we're - // removing only idle connections. If there were - // idle connections, then there should be no waiters. + expired.add(entry); + td("expire(): Expired ", entry); } } - return conns.isEmpty(); // whether whole list has 'expired' + + synchronized (this) { + conns.removeAll(expired); + // Don't need to call notify() because we're + // removing only idle connections. If there were + // idle connections, then there should be no waiters. + return conns.isEmpty(); // whether whole list has 'expired' + } } /**
--- a/src/share/classes/com/sun/jndi/ldap/pool/Pool.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/com/sun/jndi/ldap/pool/Pool.java Tue May 09 04:03:50 2017 +0100 @@ -25,11 +25,11 @@ package com.sun.jndi.ldap.pool; +import java.util.ArrayList; import java.util.Map; import java.util.WeakHashMap; import java.util.Collection; import java.util.Collections; -import java.util.Iterator; import java.util.LinkedList; import java.io.PrintStream; @@ -166,17 +166,25 @@ * and removed. */ public void expire(long threshold) { + Collection<ConnectionsRef> copy; synchronized (map) { - Iterator<ConnectionsRef> iter = map.values().iterator(); - Connections conns; - while (iter.hasNext()) { - conns = iter.next().getConnections(); - if (conns.expire(threshold)) { - d("expire(): removing ", conns); - iter.remove(); - } + copy = new ArrayList<>(map.values()); + } + + ArrayList<ConnectionsRef> removed = new ArrayList<>(); + Connections conns; + for (ConnectionsRef ref : copy) { + conns = ref.getConnections(); + if (conns.expire(threshold)) { + d("expire(): removing ", conns); + removed.add(ref); } } + + synchronized (map) { + map.values().removeAll(removed); + } + expungeStaleConnections(); }
--- a/src/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/com/sun/rowset/RowSetResourceBundle_sv.properties Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2005, 2017, 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 @@ -41,7 +41,7 @@ cachedrowsetimpl.longfail = getLong utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1} cachedrowsetimpl.floatfail = getFloat utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1} cachedrowsetimpl.doublefail = getDouble utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1} -cachedrowsetimpl.dtypemismt = Inkompatibel datatyp +cachedrowsetimpl.dtypemismt = Felmatchad datatyp cachedrowsetimpl.datefail = getDate utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}, ingen konvertering tillg\u00E4nglig cachedrowsetimpl.timefail = getTime utf\u00F6rdes inte f\u00F6r v\u00E4rdet ({0}) i kolumnen {1}, ingen konvertering tillg\u00E4nglig cachedrowsetimpl.posupdate = Det finns inte st\u00F6d f\u00F6r positionerad uppdatering
--- a/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_ko.properties Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/com/sun/swing/internal/plaf/metal/resources/metal_ko.properties Tue May 09 04:03:50 2017 +0100 @@ -36,7 +36,7 @@ FileChooser.detailsViewButtonToolTip.textAndMnemonic=\uC138\uBD80\uC815\uBCF4 FileChooser.detailsViewButtonAccessibleName=\uC138\uBD80\uC815\uBCF4 FileChooser.detailsViewActionLabel.textAndMnemonic=\uC138\uBD80\uC815\uBCF4 -FileChooser.refreshActionLabel.textAndMnemonic=\uC0C8\uB85C \uACE0\uCE68 +FileChooser.refreshActionLabel.textAndMnemonic=\uC0C8\uB85C\uACE0\uCE68 FileChooser.viewMenuLabel.textAndMnemonic=\uBCF4\uAE30 FileChooser.fileNameHeader.textAndMnemonic=\uC774\uB984 FileChooser.fileSizeHeader.textAndMnemonic=\uD06C\uAE30
--- a/src/share/classes/com/sun/swing/internal/plaf/synth/resources/synth_ko.properties Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/com/sun/swing/internal/plaf/synth/resources/synth_ko.properties Tue May 09 04:03:50 2017 +0100 @@ -36,7 +36,7 @@ FileChooser.detailsViewButtonToolTip.textAndMnemonic=\uC138\uBD80\uC815\uBCF4 FileChooser.detailsViewButtonAccessibleName=\uC138\uBD80\uC815\uBCF4 FileChooser.detailsViewActionLabel.textAndMnemonic=\uC138\uBD80\uC815\uBCF4 -FileChooser.refreshActionLabel.textAndMnemonic=\uC0C8\uB85C \uACE0\uCE68 +FileChooser.refreshActionLabel.textAndMnemonic=\uC0C8\uB85C\uACE0\uCE68 FileChooser.viewMenuLabel.textAndMnemonic=\uBCF4\uAE30 FileChooser.fileNameHeader.textAndMnemonic=\uC774\uB984 FileChooser.fileSizeHeader.textAndMnemonic=\uD06C\uAE30
--- a/src/share/classes/java/awt/Menu.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/java/awt/Menu.java Tue May 09 04:03:50 2017 +0100 @@ -411,9 +411,9 @@ items.removeElementAt(index); MenuPeer peer = (MenuPeer)this.peer; if (peer != null) { + peer.delItem(index); mi.removeNotify(); mi.parent = null; - peer.delItem(index); } } }
--- a/src/share/classes/java/awt/MenuBar.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/java/awt/MenuBar.java Tue May 09 04:03:50 2017 +0100 @@ -222,7 +222,6 @@ if (m.parent != null) { m.parent.remove(m); } - menus.addElement(m); m.parent = this; MenuBarPeer peer = (MenuBarPeer)this.peer; @@ -230,7 +229,10 @@ if (m.peer == null) { m.addNotify(); } + menus.addElement(m); peer.addMenu(m); + } else { + menus.addElement(m); } return m; } @@ -248,9 +250,9 @@ menus.removeElementAt(index); MenuBarPeer peer = (MenuBarPeer)this.peer; if (peer != null) { + peer.delMenu(index); m.removeNotify(); m.parent = null; - peer.delMenu(index); } if (helpMenu == m) { helpMenu = null;
--- a/src/share/classes/java/awt/MenuComponent.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/java/awt/MenuComponent.java Tue May 09 04:03:50 2017 +0100 @@ -75,7 +75,7 @@ * @see #setFont(Font) * @see #getFont() */ - Font font; + volatile Font font; /** * The menu component's name, which defaults to <code>null</code>. @@ -292,11 +292,13 @@ * @see java.awt.font.TextAttribute */ public void setFont(Font f) { - font = f; - //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) - MenuComponentPeer peer = this.peer; - if (peer != null) { - peer.setFont(f); + synchronized (getTreeLock()) { + font = f; + //Fixed 6312943: NullPointerException in method MenuComponent.setFont(Font) + MenuComponentPeer peer = this.peer; + if (peer != null) { + peer.setFont(f); + } } }
--- a/src/share/classes/java/awt/Window.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/java/awt/Window.java Tue May 09 04:03:50 2017 +0100 @@ -4100,6 +4100,10 @@ public void setTrayIconWindow(Window w, boolean isTrayIconWindow) { w.isTrayIconWindow = isTrayIconWindow; } + + public Window[] getOwnedWindows(Window w) { + return w.getOwnedWindows_NoClientCode(); + } }); // WindowAccessor } // static
--- a/src/share/classes/java/io/ObjectInputStream.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/java/io/ObjectInputStream.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2017, 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 @@ -1774,12 +1774,19 @@ } catch (ClassNotFoundException ex) { resolveEx = ex; } + + // Call filterCheck on the class before reading anything else + filterCheck(cl, -1); + skipCustomData(); - desc.initProxy(cl, resolveEx, readClassDesc(false)); - - // Call filterCheck on the definition - filterCheck(desc.forClass(), -1); + try { + totalObjectRefs++; + depth++; + desc.initProxy(cl, resolveEx, readClassDesc(false)); + } finally { + depth--; + } handles.finish(descHandle); passHandle = descHandle; @@ -1824,12 +1831,19 @@ } catch (ClassNotFoundException ex) { resolveEx = ex; } + + // Call filterCheck on the class before reading anything else + filterCheck(cl, -1); + skipCustomData(); - desc.initNonProxy(readDesc, cl, resolveEx, readClassDesc(false)); - - // Call filterCheck on the definition - filterCheck(desc.forClass(), -1); + try { + totalObjectRefs++; + depth++; + desc.initNonProxy(readDesc, cl, resolveEx, readClassDesc(false)); + } finally { + depth--; + } handles.finish(descHandle); passHandle = descHandle;
--- a/src/share/classes/java/lang/Thread.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/java/lang/Thread.java Tue May 09 04:03:50 2017 +0100 @@ -342,11 +342,11 @@ /** * Initializes a Thread with the current AccessControlContext. - * @see #init(ThreadGroup,Runnable,String,long,AccessControlContext) + * @see #init(ThreadGroup,Runnable,String,long,AccessControlContext,boolean) */ private void init(ThreadGroup g, Runnable target, String name, long stackSize) { - init(g, target, name, stackSize, null); + init(g, target, name, stackSize, null, true); } /** @@ -359,9 +359,12 @@ * zero to indicate that this parameter is to be ignored. * @param acc the AccessControlContext to inherit, or * AccessController.getContext() if null + * @param inheritThreadLocals if {@code true}, inherit initial values for + * inheritable thread-locals from the constructing thread */ private void init(ThreadGroup g, Runnable target, String name, - long stackSize, AccessControlContext acc) { + long stackSize, AccessControlContext acc, + boolean inheritThreadLocals) { if (name == null) { throw new NullPointerException("name cannot be null"); } @@ -412,7 +415,7 @@ acc != null ? acc : AccessController.getContext(); this.target = target; setPriority(priority); - if (parent.inheritableThreadLocals != null) + if (inheritThreadLocals && parent.inheritableThreadLocals != null) this.inheritableThreadLocals = ThreadLocal.createInheritedMap(parent.inheritableThreadLocals); /* Stash the specified stack size in case the VM cares */ @@ -466,7 +469,7 @@ * This is not a public constructor. */ Thread(Runnable target, AccessControlContext acc) { - init(null, target, "Thread-" + nextThreadNum(), 0, acc); + init(null, target, "Thread-" + nextThreadNum(), 0, acc, false); } /**
--- a/src/share/classes/sun/awt/AWTAccessor.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/sun/awt/AWTAccessor.java Tue May 09 04:03:50 2017 +0100 @@ -334,6 +334,12 @@ * Marks the specified window as an utility window for TrayIcon. */ void setTrayIconWindow(Window w, boolean isTrayIconWindow); + + /** + * Return an array containing all the windows this + * window currently owns. + */ + Window[] getOwnedWindows(Window w); } /**
--- a/src/share/classes/sun/misc/Launcher.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/sun/misc/Launcher.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2016, 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 @@ -28,11 +28,7 @@ import java.io.File; import java.io.IOException; import java.io.FilePermission; -import java.net.URL; -import java.net.URLClassLoader; -import java.net.MalformedURLException; -import java.net.URLStreamHandler; -import java.net.URLStreamHandlerFactory; +import java.net.*; import java.util.HashSet; import java.util.StringTokenizer; import java.util.Set; @@ -213,8 +209,16 @@ URL[] urls = super.getURLs(); File prevDir = null; for (int i = 0; i < urls.length; i++) { - // Get the ext directory from the URL - File dir = new File(urls[i].getPath()).getParentFile(); + // Get the ext directory from the URL; convert to + // URI first, so the URL will be decoded. + URI uri; + try { + uri = urls[i].toURI(); + } catch (URISyntaxException ue) { + // skip this URL if cannot convert it to URI + continue; + } + File dir = new File(uri).getParentFile(); if (dir != null && !dir.equals(prevDir)) { // Look in architecture-specific subdirectory first // Read from the saved system properties to avoid deadlock
--- a/src/share/classes/sun/net/ftp/impl/FtpClient.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/sun/net/ftp/impl/FtpClient.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2017, 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 @@ -517,7 +517,8 @@ * @return <code>true</code> if the command was successful * @throws IOException */ - private boolean issueCommand(String cmd) throws IOException { + private boolean issueCommand(String cmd) throws IOException, + sun.net.ftp.FtpProtocolException { if (!isConnected()) { throw new IllegalStateException("Not connected"); } @@ -528,6 +529,12 @@ // ignore... } } + if (cmd.indexOf('\n') != -1) { + sun.net.ftp.FtpProtocolException ex + = new sun.net.ftp.FtpProtocolException("Illegal FTP command"); + ex.initCause(new IllegalArgumentException("Illegal carriage return")); + throw ex; + } sendServer(cmd + "\r\n"); return readReply(); } @@ -1120,7 +1127,10 @@ */ public void close() throws IOException { if (isConnected()) { - issueCommand("QUIT"); + try { + issueCommand("QUIT"); + } catch (FtpProtocolException e) { + } loggedIn = false; } disconnect(); @@ -1898,7 +1908,8 @@ return null; } - private boolean sendSecurityData(byte[] buf) throws IOException { + private boolean sendSecurityData(byte[] buf) throws IOException, + sun.net.ftp.FtpProtocolException { BASE64Encoder encoder = new BASE64Encoder(); String s = encoder.encode(buf); return issueCommand("ADAT " + s);
--- a/src/share/classes/sun/net/smtp/SmtpClient.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/sun/net/smtp/SmtpClient.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2017, 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 @@ -43,6 +43,7 @@ public class SmtpClient extends TransferProtocolClient { + private static int DEFAULT_SMTP_PORT = 25; String mailhost; SmtpPrintStream message; @@ -74,6 +75,10 @@ } public void to(String s) throws IOException { + if (s.indexOf('\n') != -1) { + throw new IOException("Illegal SMTP command", + new IllegalArgumentException("Illegal carriage return")); + } int st = 0; int limit = s.length(); int pos = 0; @@ -116,16 +121,21 @@ } public void from(String s) throws IOException { - if (s.startsWith("<")) + if (s.indexOf('\n') != -1) { + throw new IOException("Illegal SMTP command", + new IllegalArgumentException("Illegal carriage return")); + } + if (s.startsWith("<")) { issueCommand("mail from: " + s + "\r\n", 250); - else + } else { issueCommand("mail from: <" + s + ">\r\n", 250); + } } /** open a SMTP connection to host <i>host</i>. */ private void openServer(String host) throws IOException { mailhost = host; - openServer(mailhost, 25); + openServer(mailhost, DEFAULT_SMTP_PORT); issueCommand("helo "+InetAddress.getLocalHost().getHostName()+"\r\n", 250); }
--- a/src/share/classes/sun/net/www/http/HttpClient.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/sun/net/www/http/HttpClient.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2017, 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 @@ -98,7 +98,20 @@ // from previous releases. private static boolean retryPostProp = true; + /* Value of the system property jdk.ntlm.cache; + if false, then NTLM connections will not be cached. + The default value is 'true'. */ + private static final boolean cacheNTLMProp; + /* Value of the system property jdk.spnego.cache; + if false, then connections authentified using the Negotiate/Kerberos + scheme will not be cached. + The default value is 'true'. */ + private static final boolean cacheSPNEGOProp; + volatile boolean keepingAlive = false; /* this is a keep-alive connection */ + volatile boolean disableKeepAlive;/* keep-alive has been disabled for this + connection - this will be used when + recomputing the value of keepingAlive */ int keepAliveConnections = -1; /* number of keep-alives left */ /**Idle timeout value, in milliseconds. Zero means infinity, @@ -149,6 +162,12 @@ String retryPost = java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction("sun.net.http.retryPost")); + String cacheNTLM = java.security.AccessController.doPrivileged( + new sun.security.action.GetPropertyAction("jdk.ntlm.cache")); + + String cacheSPNEGO = java.security.AccessController.doPrivileged( + new sun.security.action.GetPropertyAction("jdk.spnego.cache")); + if (keepAlive != null) { keepAliveProp = Boolean.valueOf(keepAlive).booleanValue(); } else { @@ -157,9 +176,21 @@ if (retryPost != null) { retryPostProp = Boolean.valueOf(retryPost).booleanValue(); - } else - retryPostProp = true; + } else { + retryPostProp = true; + } + if (cacheNTLM != null) { + cacheNTLMProp = Boolean.parseBoolean(cacheNTLM); + } else { + cacheNTLMProp = true; + } + + if (cacheSPNEGO != null) { + cacheSPNEGOProp = Boolean.parseBoolean(cacheSPNEGO); + } else { + cacheSPNEGOProp = true; + } } /** @@ -708,6 +739,7 @@ nread += r; } String keep=null; + String authenticate=null; ret = b[0] == 'H' && b[1] == 'T' && b[2] == 'T' && b[3] == 'P' && b[4] == '/' && b[5] == '1' && b[6] == '.'; @@ -736,17 +768,44 @@ */ if (usingProxy) { // not likely a proxy will return this keep = responses.findValue("Proxy-Connection"); + authenticate = responses.findValue("Proxy-Authenticate"); } if (keep == null) { keep = responses.findValue("Connection"); + authenticate = responses.findValue("WWW-Authenticate"); } + + // 'disableKeepAlive' starts with the value false. + // It can transition from false to true, but once true + // it stays true. + // If cacheNTLMProp is false, and disableKeepAlive is false, + // then we need to examine the response headers to figure out + // whether we are doing NTLM authentication. If we do NTLM, + // and cacheNTLMProp is false, than we can't keep this connection + // alive: we will switch disableKeepAlive to true. + boolean canKeepAlive = !disableKeepAlive; + if (canKeepAlive && (cacheNTLMProp == false || cacheSPNEGOProp == false) + && authenticate != null) { + authenticate = authenticate.toLowerCase(Locale.US); + if (cacheNTLMProp == false) { + canKeepAlive &= !authenticate.startsWith("ntlm "); + } + if (cacheSPNEGOProp == false) { + canKeepAlive &= !authenticate.startsWith("negotiate "); + canKeepAlive &= !authenticate.startsWith("kerberos "); + } + } + disableKeepAlive |= !canKeepAlive; + if (keep != null && keep.toLowerCase(Locale.US).equals("keep-alive")) { /* some servers, notably Apache1.1, send something like: * "Keep-Alive: timeout=15, max=1" which we should respect. */ - HeaderParser p = new HeaderParser( + if (disableKeepAlive) { + keepAliveConnections = 1; + } else { + HeaderParser p = new HeaderParser( responses.findValue("Keep-Alive")); - if (p != null) { /* default should be larger in case of proxy */ keepAliveConnections = p.findInt("max", usingProxy?50:5); keepAliveTimeout = p.findInt("timeout", usingProxy?60:5); @@ -756,7 +815,7 @@ * We're talking 1.1 or later. Keep persistent until * the server says to close. */ - if (keep != null) { + if (keep != null || disableKeepAlive) { /* * The only Connection token we understand is close. * Paranoia: if there is any Connection header then @@ -838,7 +897,7 @@ keepAliveConnections = 1; keepingAlive = false; } else { - keepingAlive = true; + keepingAlive = !disableKeepAlive; } failedOnce = false; } else { @@ -871,7 +930,7 @@ (cl >= 0 || code == HttpURLConnection.HTTP_NOT_MODIFIED || code == HttpURLConnection.HTTP_NO_CONTENT)) { - keepingAlive = true; + keepingAlive = !disableKeepAlive; failedOnce = false; } else if (keepingAlive) { /* Previously we were keeping alive, and now we're not. Remove @@ -893,7 +952,11 @@ pi.setContentType(responses.findValue("content-type")); } - if (isKeepingAlive()) { + // If disableKeepAlive == true, the client will not be returned + // to the cache. But we still need to use a keepalive stream to + // allow the multi-message authentication exchange on the connection + boolean useKeepAliveStream = isKeepingAlive() || disableKeepAlive; + if (useKeepAliveStream) { // Wrap KeepAliveStream if keep alive is enabled. logFinest("KeepAlive stream used: " + url); serverInput = new KeepAliveStream(serverInput, pi, cl, this);
--- a/src/share/classes/sun/net/www/protocol/ftp/FtpURLConnection.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/sun/net/www/protocol/ftp/FtpURLConnection.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1994, 2016, 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 @@ -298,6 +298,13 @@ // Just keep throwing for now. throw e; } catch (FtpProtocolException fe) { + if (ftp != null) { + try { + ftp.close(); + } catch (IOException ioe) { + fe.addSuppressed(ioe); + } + } throw new IOException(fe); } try { @@ -480,11 +487,34 @@ msgh.add("content-type", "text/plain"); msgh.add("access-type", "directory"); } catch (IOException ex) { - throw new FileNotFoundException(fullpath); + FileNotFoundException fnfe = new FileNotFoundException(fullpath); + if (ftp != null) { + try { + ftp.close(); + } catch (IOException ioe) { + fnfe.addSuppressed(ioe); + } + } + throw fnfe; } catch (FtpProtocolException ex2) { - throw new FileNotFoundException(fullpath); + FileNotFoundException fnfe = new FileNotFoundException(fullpath); + if (ftp != null) { + try { + ftp.close(); + } catch (IOException ioe) { + fnfe.addSuppressed(ioe); + } + } + throw fnfe; } } catch (FtpProtocolException ftpe) { + if (ftp != null) { + try { + ftp.close(); + } catch (IOException ioe) { + ftpe.addSuppressed(ioe); + } + } throw new IOException(ftpe); } setProperties(msgh);
--- a/src/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1995, 2016, 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 @@ -64,8 +64,7 @@ * repeatedly, via the Authenticator. Default is false, which means that this * behavior is switched off. */ - static boolean serializeAuth; - + static final boolean serializeAuth; static { serializeAuth = java.security.AccessController.doPrivileged( new sun.security.action.GetBooleanAction( @@ -105,6 +104,16 @@ public String getProtocolScheme() { return protocol; } + /** + * Whether we should cache this instance in the AuthCache. + * This method returns {@code true} by default. + * Subclasses may override this method to add + * additional restrictions. + * @return {@code true} by default. + */ + protected boolean useAuthCache() { + return true; + } /** * requests is used to ensure that interaction with the @@ -341,9 +350,11 @@ */ void addToCache() { String key = cacheKey(true); - cache.put(key, this); - if (supportsPreemptiveAuthorization()) { - cache.put(cacheKey(false), this); + if (useAuthCache()) { + cache.put(key, this); + if (supportsPreemptiveAuthorization()) { + cache.put(cacheKey(false), this); + } } endAuthRequest(key); }
--- a/src/share/classes/sun/net/www/protocol/http/NegotiateAuthentication.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/sun/net/www/protocol/http/NegotiateAuthentication.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2017, 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 @@ -34,6 +34,7 @@ import sun.util.logging.PlatformLogger; import static sun.net.www.protocol.http.AuthScheme.NEGOTIATE; import static sun.net.www.protocol.http.AuthScheme.KERBEROS; +import sun.security.action.GetPropertyAction; /** * NegotiateAuthentication: @@ -52,10 +53,18 @@ // These maps are used to manage the GSS availability for diffrent // hosts. The key for both maps is the host name. // <code>supported</code> is set when isSupported is checked, + // if it's true, a cached Negotiator is put into <code>cache</code>. // the cache can be used only once, so after the first use, it's cleaned. static HashMap <String, Boolean> supported = null; - static HashMap <String, Negotiator> cache = null; + static ThreadLocal <HashMap <String, Negotiator>> cache = null; + /* Whether cache is enabled for Negotiate/Kerberos */ + private static final boolean cacheSPNEGO; + static { + String spnegoCacheProp = java.security.AccessController.doPrivileged( + new sun.security.action.GetPropertyAction("jdk.spnego.cache", "true")); + cacheSPNEGO = Boolean.parseBoolean(spnegoCacheProp); + } // The HTTP Negotiate Helper private Negotiator negotiator = null; @@ -118,8 +127,7 @@ */ private static synchronized boolean isSupportedImpl(HttpCallerInfo hci) { if (supported == null) { - supported = new HashMap <String, Boolean>(); - cache = new HashMap <String, Negotiator>(); + supported = new HashMap<>(); } String hostname = hci.host; hostname = hostname.toLowerCase(); @@ -132,7 +140,15 @@ supported.put(hostname, true); // the only place cache.put is called. here we can make sure // the object is valid and the oneToken inside is not null - cache.put(hostname, neg); + if (cache == null) { + cache = new ThreadLocal<HashMap<String, Negotiator>>() { + @Override + protected HashMap<String, Negotiator> initialValue() { + return new HashMap<>(); + } + }; + } + cache.get().put(hostname, neg); return true; } else { supported.put(hostname, false); @@ -140,6 +156,16 @@ } } + private static synchronized HashMap<String, Negotiator> getCache() { + if (cache == null) return null; + return cache.get(); + } + + @Override + protected boolean useAuthCache() { + return super.useAuthCache() && cacheSPNEGO; + } + /** * Not supported. Must use the setHeaders() method */ @@ -197,12 +223,11 @@ */ private byte[] firstToken() throws IOException { negotiator = null; - if (cache != null) { - synchronized(cache) { - negotiator = cache.get(getHost()); - if (negotiator != null) { - cache.remove(getHost()); // so that it is only used once - } + HashMap <String, Negotiator> cachedMap = getCache(); + if (cachedMap != null) { + negotiator = cachedMap.get(getHost()); + if (negotiator != null) { + cachedMap.remove(getHost()); // so that it is only used once } } if (negotiator == null) {
--- a/src/share/classes/sun/security/smartcardio/TerminalImpl.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/sun/security/smartcardio/TerminalImpl.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, 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 @@ -75,10 +75,10 @@ } } try { - card = new CardImpl(this, protocol); + card = new CardImpl(this, protocol); return card; } catch (PCSCException e) { - if (e.code == SCARD_W_REMOVED_CARD) { + if (e.code == SCARD_W_REMOVED_CARD || e.code == SCARD_E_NO_SMARTCARD) { throw new CardNotPresentException("No card present", e); } else { throw new CardException("connect() failed", e);
--- a/src/share/classes/sun/security/tools/jarsigner/Resources_ja.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/sun/security/tools/jarsigner/Resources_ja.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -134,15 +134,15 @@ " X =\u6307\u5B9A\u3057\u305F\u5225\u540D\u3067\u7F72\u540D\u3055\u308C\u3066\u3044\u307E\u305B\u3093"}, {"no.manifest.", "\u30DE\u30CB\u30D5\u30A7\u30B9\u30C8\u306F\u5B58\u5728\u3057\u307E\u305B\u3093\u3002"}, {".Signature.related.entries.","(\u30B7\u30B0\u30CD\u30C1\u30E3\u95A2\u9023\u30A8\u30F3\u30C8\u30EA)"}, - {".Unsigned.entries.", "(\u672A\u7F72\u540D\u306E\u30A8\u30F3\u30C8\u30EA)"}, + {".Unsigned.entries.", "(\u7F72\u540D\u306A\u3057\u306E\u30A8\u30F3\u30C8\u30EA)"}, {"jar.is.unsigned", "jar\u306F\u7F72\u540D\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"}, {"jar.treated.unsigned", - "\u8B66\u544A: \u7F72\u540D\u304C\u69CB\u6587\u89E3\u6790\u3067\u304D\u306A\u3044\u304B\u691C\u8A3C\u3067\u304D\u306A\u3044\u305F\u3081\u3001\u3053\u306Ejar\u306F\u672A\u7F72\u540D\u3068\u3057\u3066\u6271\u308F\u308C\u307E\u3059\u3002\u8A73\u7D30\u306F\u3001\u30C7\u30D0\u30C3\u30B0\u3092\u6709\u52B9\u306B\u3057\u3066(-J-Djava.security.debug=jar) jarsigner\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"}, + "\u8B66\u544A: \u7F72\u540D\u304C\u69CB\u6587\u89E3\u6790\u3067\u304D\u306A\u3044\u304B\u691C\u8A3C\u3067\u304D\u306A\u3044\u305F\u3081\u3001\u3053\u306Ejar\u306F\u7F72\u540D\u306A\u3057\u3068\u3057\u3066\u6271\u308F\u308C\u307E\u3059\u3002\u8A73\u7D30\u306F\u3001\u30C7\u30D0\u30C3\u30B0\u3092\u6709\u52B9\u306B\u3057\u3066(-J-Djava.security.debug=jar) jarsigner\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"}, {"jar.treated.unsigned.see.weak", - "\u3053\u306Ejar\u306F\u3001\u73FE\u5728\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u5F31\u3044\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3067\u7F72\u540D\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u672A\u7F72\u540D\u3068\u3057\u3066\u6271\u308F\u308C\u307E\u3059\u3002\n\n\u8A73\u7D30\u306F\u3001-verbose\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u3066jarsigner\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"}, + "\u3053\u306Ejar\u306F\u3001\u73FE\u5728\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u5F31\u3044\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3067\u7F72\u540D\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u7F72\u540D\u306A\u3057\u3068\u3057\u3066\u6271\u308F\u308C\u307E\u3059\u3002\n\n\u8A73\u7D30\u306F\u3001-verbose\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u3066jarsigner\u3092\u518D\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"}, {"jar.treated.unsigned.see.weak.verbose", - "\u8B66\u544A: \u3053\u306Ejar\u306F\u3001\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u3088\u3063\u3066\u73FE\u5728\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u5F31\u3044\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3067\u7F72\u540D\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u672A\u7F72\u540D\u3068\u3057\u3066\u6271\u308F\u308C\u307E\u3059:"}, + "\u8B66\u544A: \u3053\u306Ejar\u306F\u3001\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30D7\u30ED\u30D1\u30C6\u30A3\u306B\u3088\u3063\u3066\u73FE\u5728\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u5F31\u3044\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3067\u7F72\u540D\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u7F72\u540D\u306A\u3057\u3068\u3057\u3066\u6271\u308F\u308C\u307E\u3059:"}, {"jar.signed.", "jar\u306F\u7F72\u540D\u3055\u308C\u307E\u3057\u305F\u3002"}, {"jar.signed.with.signer.errors.", "jar\u306F\u7F72\u540D\u3055\u308C\u307E\u3057\u305F - \u7F72\u540D\u8005\u30A8\u30E9\u30FC\u304C\u3042\u308A\u307E\u3059\u3002"}, {"jar.verified.", "jar\u304C\u691C\u8A3C\u3055\u308C\u307E\u3057\u305F\u3002"}, @@ -215,7 +215,7 @@ {"Warning.", "\u8B66\u544A: "}, {"Error.", "\u30A8\u30E9\u30FC: "}, {"This.jar.contains.unsigned.entries.which.have.not.been.integrity.checked.", - "\u3053\u306Ejar\u306B\u306F\u3001\u6574\u5408\u6027\u30C1\u30A7\u30C3\u30AF\u3092\u3057\u3066\u3044\u306A\u3044\u672A\u7F72\u540D\u306E\u30A8\u30F3\u30C8\u30EA\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002 "}, + "\u3053\u306Ejar\u306B\u306F\u3001\u6574\u5408\u6027\u30C1\u30A7\u30C3\u30AF\u3092\u3057\u3066\u3044\u306A\u3044\u7F72\u540D\u306A\u3057\u306E\u30A8\u30F3\u30C8\u30EA\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002 "}, {"This.jar.contains.entries.whose.signer.certificate.has.expired.", "\u3053\u306Ejar\u306B\u306F\u3001\u7F72\u540D\u8005\u306E\u8A3C\u660E\u66F8\u304C\u671F\u9650\u5207\u308C\u306E\u30A8\u30F3\u30C8\u30EA\u304C\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002 "}, {"This.jar.contains.entries.whose.signer.certificate.will.expire.within.six.months.",
--- a/src/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/sun/security/tools/jarsigner/Resources_zh_CN.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -142,7 +142,7 @@ {"jar.treated.unsigned.see.weak", "\u7531\u4E8E\u8BE5 jar \u662F\u4F7F\u7528\u76EE\u524D\u5DF2\u7981\u7528\u7684\u5F31\u7B97\u6CD5\u7B7E\u540D\u7684, \u56E0\u6B64\u8BE5 jar \u5C06\u88AB\u89C6\u4E3A\u672A\u7B7E\u540D\u3002\n\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u4F7F\u7528 -verbose \u9009\u9879\u91CD\u65B0\u8FD0\u884C jarsigner\u3002"}, {"jar.treated.unsigned.see.weak.verbose", - "\u8B66\u544A: \u7531\u4E8E\u8BE5 jar \u662F\u4F7F\u7528\u76EE\u524D\u5DF2\u7531\u5B89\u5168\u5C5E\u6027\u7981\u7528\u7684\u5F31\u7B97\u6CD5\u7B7E\u540D\u7684, \u56E0\u6B64\u8BE5 jar \u5C06\u88AB\u89C6\u4E3A\u672A\u7B7E\u540D:"}, + "\u8B66\u544A: \u8BE5 jar \u5C06\u88AB\u89C6\u4E3A\u672A\u7B7E\u540D, \u56E0\u4E3A\u5B83\u662F\u7531\u76EE\u524D\u5B89\u5168\u5C5E\u6027\u7981\u7528\u7684\u5F31\u7B97\u6CD5\u7B7E\u540D\u7684:"}, {"jar.signed.", "jar \u5DF2\u7B7E\u540D\u3002"}, {"jar.signed.with.signer.errors.", "jar \u5DF2\u7B7E\u540D, \u4F46\u51FA\u73B0\u7B7E\u540D\u8005\u9519\u8BEF\u3002"}, {"jar.verified.", "jar \u5DF2\u9A8C\u8BC1\u3002"},
--- a/src/share/classes/sun/security/tools/policytool/Resources_sv.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/sun/security/tools/policytool/Resources_sv.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, 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 @@ -68,7 +68,7 @@ "Kan inte \u00F6ppna policyfilen: {0}: {1}"}, {"Policy.Tool", "Policyverktyg"}, {"Errors.have.occurred.while.opening.the.policy.configuration.View.the.Warning.Log.for.more.information.", - "Det uppstod ett fel n\u00E4r policykonfigurationen skulle \u00F6ppnas. Se varningsloggen f\u00F6r mer information."}, + "Ett fel intr\u00E4ffade n\u00E4r policykonfigurationen skulle \u00F6ppnas. Se varningsloggen f\u00F6r mer information."}, {"Error", "Fel"}, {"OK", "OK"}, {"Status", "Status"}, @@ -80,7 +80,7 @@ {"Target.Name.", "M\u00E5l: "}, {"Actions.", - "Funktioner: "}, + "\u00C5tg\u00E4rder: "}, {"OK.to.overwrite.existing.file.filename.", "Ska den befintliga filen {0} skrivas \u00F6ver?"}, {"Cancel", "Avbryt"}, @@ -94,10 +94,10 @@ {".Edit.Permission", " Re&digera beh\u00F6righet"}, {"Remove.Permission", "Ta &bort beh\u00F6righet"}, {"Done", "Utf\u00F6rd"}, - {"KeyStore.URL.", "KeyStore-&URL:"}, - {"KeyStore.Type.", "KeyStore-&typ:"}, - {"KeyStore.Provider.", "KeyStore-&leverant\u00F6r:"}, - {"KeyStore.Password.URL.", "KeyStore-l\u00F6sen&ords-URL:"}, + {"KeyStore.URL.", "Nyckellager-&URL:"}, + {"KeyStore.Type.", "Nyckellager&typ:"}, + {"KeyStore.Provider.", "Nyckellager&leverant\u00F6r:"}, + {"KeyStore.Password.URL.", "L\u00F6sen&ords-URL till nyckellager:"}, {"Principals", "Identitetshavare"}, {".Edit.Principal.", " Redigera identitetshavare:"}, {".Add.New.Principal.", " L\u00E4gg till ny identitetshavare:"},
--- a/src/share/classes/sun/security/util/AbstractAlgorithmConstraints.java Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/sun/security/util/AbstractAlgorithmConstraints.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2016, 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
--- a/src/share/classes/sun/tools/jar/resources/jar_sv.properties Tue May 09 03:09:51 2017 +0100 +++ b/src/share/classes/sun/tools/jar/resources/jar_sv.properties Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1999, 2017, 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 @@ -30,7 +30,7 @@ error.bad.uflag=f\u00F6r u-flaggan m\u00E5ste manifest-, e-flagg- eller indatafiler anges. error.bad.eflag=e-flaggan och manifest med attributet Main-Class kan inte anges \ntillsammans. error.nosuch.fileordir={0} : det finns ingen s\u00E5dan fil eller katalog -error.write.file=Det uppstod ett fel vid skrivning till befintlig jar-fil. +error.write.file=Ett fel intr\u00E4ffade vid skrivning till befintlig jar-fil. error.create.dir={0} : kunde inte skapa n\u00E5gon katalog error.incorrect.length=ogiltig l\u00E4ngd vid bearbetning: {0} error.create.tempfile=Kunde inte skapa en tillf\u00E4llig fil
--- a/src/share/lib/security/java.security-aix Tue May 09 03:09:51 2017 +0100 +++ b/src/share/lib/security/java.security-aix Tue May 09 04:03:50 2017 +0100 @@ -552,7 +552,7 @@ # implementation. It is not guaranteed to be examined and used by other # implementations. # -jdk.jar.disabledAlgorithms=MD2, RSA keySize < 1024 +jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024 # Algorithm restrictions for Secure Socket Layer/Transport Layer Security # (SSL/TLS) processing
--- a/src/share/lib/security/java.security-linux Tue May 09 03:09:51 2017 +0100 +++ b/src/share/lib/security/java.security-linux Tue May 09 04:03:50 2017 +0100 @@ -552,7 +552,7 @@ # implementation. It is not guaranteed to be examined and used by other # implementations. # -jdk.jar.disabledAlgorithms=MD2, RSA keySize < 1024 +jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024 # Algorithm restrictions for Secure Socket Layer/Transport Layer Security # (SSL/TLS) processing
--- a/src/share/lib/security/java.security-macosx Tue May 09 03:09:51 2017 +0100 +++ b/src/share/lib/security/java.security-macosx Tue May 09 04:03:50 2017 +0100 @@ -555,7 +555,7 @@ # implementation. It is not guaranteed to be examined and used by other # implementations. # -jdk.jar.disabledAlgorithms=MD2, RSA keySize < 1024 +jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024 # Algorithm restrictions for Secure Socket Layer/Transport Layer Security # (SSL/TLS) processing
--- a/src/share/lib/security/java.security-solaris Tue May 09 03:09:51 2017 +0100 +++ b/src/share/lib/security/java.security-solaris Tue May 09 04:03:50 2017 +0100 @@ -554,7 +554,7 @@ # implementation. It is not guaranteed to be examined and used by other # implementations. # -jdk.jar.disabledAlgorithms=MD2, RSA keySize < 1024 +jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024 # Algorithm restrictions for Secure Socket Layer/Transport Layer Security # (SSL/TLS) processing
--- a/src/share/lib/security/java.security-windows Tue May 09 03:09:51 2017 +0100 +++ b/src/share/lib/security/java.security-windows Tue May 09 04:03:50 2017 +0100 @@ -555,7 +555,7 @@ # implementation. It is not guaranteed to be examined and used by other # implementations. # -jdk.jar.disabledAlgorithms=MD2, RSA keySize < 1024 +jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024 # Algorithm restrictions for Secure Socket Layer/Transport Layer Security # (SSL/TLS) processing
--- a/src/solaris/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java Tue May 09 03:09:51 2017 +0100 +++ b/src/solaris/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2016, 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 @@ -74,11 +74,15 @@ private String hostname; private static String defaultDomain; /* Domain to use if not specified by user */ + private static final boolean ntlmCache; /* Whether cache is enabled for NTLM */ static { defaultDomain = java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction("http.auth.ntlm.domain", "")); - }; + String ntlmCacheProp = java.security.AccessController.doPrivileged( + new sun.security.action.GetPropertyAction("jdk.ntlm.cache", "true")); + ntlmCache = Boolean.parseBoolean(ntlmCacheProp); + } public static boolean supportsTransparentAuth () { return false; @@ -167,6 +171,11 @@ init (pw); } + @Override + protected boolean useAuthCache() { + return ntlmCache && super.useAuthCache(); + } + /** * @return true if this authentication supports preemptive authorization */ @@ -243,4 +252,3 @@ return result; } } -
--- a/src/windows/classes/sun/awt/windows/WMenuItemPeer.java Tue May 09 03:09:51 2017 +0100 +++ b/src/windows/classes/sun/awt/windows/WMenuItemPeer.java Tue May 09 04:03:50 2017 +0100 @@ -71,7 +71,7 @@ enable(false); } - public void readShortcutLabel() { + private void readShortcutLabel() { //Fix for 6288578: PIT. Windows: Shortcuts displayed for the menuitems in a popup menu WMenuPeer ancestor = parent; while (ancestor != null && !(ancestor instanceof WMenuBarPeer)) { @@ -115,7 +115,7 @@ readShortcutLabel(); } - protected void checkMenuCreation() + void checkMenuCreation() { // fix for 5088782: check if menu peer is created successfully if (pData == 0)
--- a/src/windows/classes/sun/awt/windows/WObjectPeer.java Tue May 09 03:09:51 2017 +0100 +++ b/src/windows/classes/sun/awt/windows/WObjectPeer.java Tue May 09 04:03:50 2017 +0100 @@ -34,16 +34,16 @@ } // The Windows handle for the native widget. - long pData; + volatile long pData; // if the native peer has been destroyed - boolean destroyed = false; + private volatile boolean destroyed; // The associated AWT object. - Object target; + volatile Object target; private volatile boolean disposed; // set from JNI if any errors in creating the peer occur - protected Error createError = null; + volatile Error createError = null; // used to synchronize the state of this peer private final Object stateLock = new Object();
--- a/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java Tue May 09 03:09:51 2017 +0100 +++ b/src/windows/classes/sun/net/www/protocol/http/ntlm/NTLMAuthentication.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, 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 @@ -50,11 +50,15 @@ private String hostname; private static String defaultDomain; /* Domain to use if not specified by user */ + private static final boolean ntlmCache; /* Whether cache is enabled for NTLM */ static { defaultDomain = java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction("http.auth.ntlm.domain", "domain")); + String ntlmCacheProp = java.security.AccessController.doPrivileged( + new sun.security.action.GetPropertyAction("jdk.ntlm.cache", "true")); + ntlmCache = Boolean.parseBoolean(ntlmCacheProp); }; private void init0() { @@ -130,6 +134,11 @@ init (pw); } + @Override + protected boolean useAuthCache() { + return ntlmCache && super.useAuthCache(); + } + /** * @return true if this authentication supports preemptive authorization */
--- a/src/windows/native/java/lang/java_props_md.c Tue May 09 03:09:51 2017 +0100 +++ b/src/windows/native/java/lang/java_props_md.c Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1998, 2016, 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 @@ -466,7 +466,9 @@ * Windows Server 2008 R2 6 1 (!VER_NT_WORKSTATION) * Windows 8 6 2 (VER_NT_WORKSTATION) * Windows Server 2012 6 2 (!VER_NT_WORKSTATION) + * Windows Server 2012 R2 6 3 (!VER_NT_WORKSTATION) * Windows 10 10 0 (VER_NT_WORKSTATION) + * Windows Server 2016 10 0 (!VER_NT_WORKSTATION) * * This mapping will presumably be augmented as new Windows * versions are released. @@ -540,6 +542,7 @@ } } else { switch (minorVersion) { + case 0: sprops.os_name = "Windows Server 2016"; break; default: sprops.os_name = "Windows NT (unknown)"; } }
--- a/src/windows/native/sun/windows/awt_Component.cpp Tue May 09 03:09:51 2017 +0100 +++ b/src/windows/native/sun/windows/awt_Component.cpp Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2016, 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 @@ -3766,7 +3766,10 @@ HWND hWnd = GetHWnd(); HWND hTop = GetTopLevelParentForWindow(hWnd); ::ClientToScreen(hTop, &p); - + if (!m_bitsCandType) { + SetCandidateWindow(m_bitsCandType, x - p.x, y - p.y); + return; + } for (int iCandType=0; iCandType<32; iCandType++, bits<<=1) { if ( m_bitsCandType & bits ) SetCandidateWindow(iCandType, x - p.x, y - p.y); @@ -3784,7 +3787,7 @@ HIMC hIMC = ImmGetContext(hwnd); CANDIDATEFORM cf; cf.dwIndex = iCandType; - cf.dwStyle = CFS_CANDIDATEPOS; + cf.dwStyle = CFS_POINT; cf.ptCurrentPos.x = x; cf.ptCurrentPos.y = y; @@ -3816,9 +3819,15 @@ MsgRouting AwtComponent::WmImeNotify(WPARAM subMsg, LPARAM bitsCandType) { - if (!m_useNativeCompWindow && subMsg == IMN_OPENCANDIDATE) { - m_bitsCandType = bitsCandType; - InquireCandidatePosition(); + if (!m_useNativeCompWindow) { + if (subMsg == IMN_OPENCANDIDATE) { + m_bitsCandType = subMsg; + InquireCandidatePosition(); + } else if (subMsg == IMN_OPENSTATUSWINDOW || + subMsg == WM_IME_STARTCOMPOSITION) { + m_bitsCandType = 0; + InquireCandidatePosition(); + } return mrConsume; } return mrDoDefault; @@ -4078,14 +4087,14 @@ return (HWND)NULL; } -/* Call DefWindowProc for the focus proxy, if any */ +/* Redirects message to the focus proxy, if any */ void AwtComponent::CallProxyDefWindowProc(UINT message, WPARAM wParam, LPARAM lParam, LRESULT &retVal, MsgRouting &mr) { if (mr != mrConsume) { HWND proxy = GetProxyFocusOwner(); if (proxy != NULL && ::IsWindowEnabled(proxy)) { - retVal = ComCtl32Util::GetInstance().DefWindowProc(NULL, proxy, message, wParam, lParam); + retVal = ::DefWindowProc(proxy, message, wParam, lParam); mr = mrConsume; } } @@ -4164,7 +4173,7 @@ JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); if (drawInfo.CtlType == ODT_MENU) { - if (drawInfo.itemData != 0) { + if (IsMenu((HMENU)drawInfo.hwndItem) && drawInfo.itemData != 0) { AwtMenu* menu = (AwtMenu*)(drawInfo.itemData); menu->DrawItem(drawInfo); }
--- a/src/windows/native/sun/windows/awt_Menu.cpp Tue May 09 03:09:51 2017 +0100 +++ b/src/windows/native/sun/windows/awt_Menu.cpp Tue May 09 04:03:50 2017 +0100 @@ -34,6 +34,13 @@ /* IMPORTANT! Read the README.JNI file for notes on JNI converted AWT code. */ +/***********************************************************************/ +// struct for _DelItem() method +struct DelItemStruct { + jobject menuitem; + jint index; +}; + /************************************************************************ * AwtMenuItem fields */ @@ -64,7 +71,6 @@ ::DestroyMenu(m_hMenu); m_hMenu = NULL; } - AwtMenuItem::Dispose(); } @@ -73,7 +79,7 @@ } /* Create a new AwtMenu object and menu. */ -AwtMenu* AwtMenu::Create(jobject self, AwtMenu* parentMenu) +AwtMenu* AwtMenu::Create(jobject self, jobject parent) { JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); @@ -85,6 +91,9 @@ return NULL; } + JNI_CHECK_NULL_GOTO(parent, "peer", done); + AwtMenu* parentMenu = (AwtMenu*) JNI_GET_PDATA(parent); + target = env->GetObjectField(self, AwtObject::targetID); JNI_CHECK_NULL_GOTO(target, "null target", done); @@ -119,6 +128,46 @@ return menu; } +void AwtMenu::_AddSeparator(void *param) +{ + if (AwtToolkit::IsMainThread()) { + JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); + + jobject self = (jobject)param; + AwtMenu *m = NULL; + PDATA pData; + JNI_CHECK_PEER_GOTO(self, ret); + m = (AwtMenu *)pData; + m->AddSeparator(); +ret: + env->DeleteGlobalRef(self); + } else { + AwtToolkit::GetInstance().InvokeFunction(AwtMenu::_AddSeparator, param); + } +} + +void AwtMenu::_DelItem(void *param) +{ + if (AwtToolkit::IsMainThread()) { + JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); + + DelItemStruct *dis = (DelItemStruct*) param; + jobject self = dis->menuitem; + jint index = dis->index; + + AwtMenu *m = NULL; + PDATA pData; + JNI_CHECK_PEER_GOTO(self, ret); + m = (AwtMenu *)pData; + m->DeleteItem(static_cast<UINT>(index)); +ret: + env->DeleteGlobalRef(self); + delete dis; + } else { + AwtToolkit::GetInstance().InvokeFunction(AwtMenu::_DelItem, param); + } +} + void AwtMenu::UpdateLayout() { UpdateLayout(GetHMenu()); @@ -239,6 +288,7 @@ } jobject menuItem = env->CallObjectMethod(target, AwtMenu::getItemMID, index); + if (!menuItem) return NULL; // menu item was removed concurrently DASSERT(!safe_ExceptionOccurred(env)); jobject wMenuItemPeer = GetPeerForTarget(env, menuItem); @@ -264,9 +314,9 @@ } /* target is a java.awt.Menu */ jobject target = GetTarget(env); - + if(!target || env->ExceptionCheck()) return; int nCount = CountItem(target); - for (int i = 0; i < nCount; i++) { + for (int i = 0; i < nCount && !env->ExceptionCheck(); i++) { AwtMenuItem* awtMenuItem = GetItem(target, i); if (awtMenuItem != NULL) { SendDrawItem(awtMenuItem, drawInfo); @@ -294,8 +344,9 @@ } /* target is a java.awt.Menu */ jobject target = GetTarget(env); + if(!target || env->ExceptionCheck()) return; int nCount = CountItem(target); - for (int i = 0; i < nCount; i++) { + for (int i = 0; i < nCount && !env->ExceptionCheck(); i++) { AwtMenuItem* awtMenuItem = GetItem(target, i); if (awtMenuItem != NULL) { SendMeasureItem(awtMenuItem, hDC, measureInfo); @@ -321,24 +372,6 @@ return (GetMenuBar() == GetMenuContainer()); } -LRESULT AwtMenu::WinThreadExecProc(ExecuteArgs * args) -{ - switch( args->cmdId ) { - case MENU_ADDSEPARATOR: - this->AddSeparator(); - break; - - case MENU_DELITEM: - this->DeleteItem(static_cast<UINT>(args->param1)); - break; - - default: - AwtMenuItem::WinThreadExecProc(args); - break; - } - return 0L; -} - /************************************************************************ * WMenuPeer native methods */ @@ -380,15 +413,14 @@ { TRY; - PDATA pData; - JNI_CHECK_PEER_RETURN(self); + jobject selfGlobalRef = env->NewGlobalRef(self); - AwtObject::WinThreadExec(self, AwtMenu::MENU_ADDSEPARATOR); + AwtToolkit::GetInstance().SyncCall(AwtMenu::_AddSeparator, selfGlobalRef); + // selfGlobalRef is deleted in _AddSeparator CATCH_BAD_ALLOC; } - /* * Class: sun_awt_windows_WMenuPeer * Method: delItem @@ -400,10 +432,12 @@ { TRY; - PDATA pData; - JNI_CHECK_PEER_RETURN(self); + DelItemStruct *dis = new DelItemStruct; + dis->menuitem = env->NewGlobalRef(self); + dis->index = index; - AwtObject::WinThreadExec(self, AwtMenu::MENU_DELITEM, index); + AwtToolkit::GetInstance().SyncCall(AwtMenu::_DelItem, dis); + // global refs and dis are deleted in _DelItem CATCH_BAD_ALLOC; } @@ -419,13 +453,8 @@ { TRY; - PDATA pData; - JNI_CHECK_PEER_RETURN(menuBar); - - AwtMenuBar* awtMenuBar = (AwtMenuBar *)pData; - AwtToolkit::CreateComponent(self, awtMenuBar, - (AwtToolkit::ComponentFactory)AwtMenu::Create,FALSE); - JNI_CHECK_PEER_CREATION_RETURN(self); + AwtToolkit::CreateComponent(self, menuBar, + (AwtToolkit::ComponentFactory)AwtMenu::Create); CATCH_BAD_ALLOC; } @@ -441,13 +470,8 @@ { TRY; - PDATA pData; - JNI_CHECK_PEER_RETURN(menu); - - AwtMenu* awtMenu = (AwtMenu *)pData; - AwtToolkit::CreateComponent(self, awtMenu, - (AwtToolkit::ComponentFactory)AwtMenu::Create,FALSE); - JNI_CHECK_PEER_CREATION_RETURN(self); + AwtToolkit::CreateComponent(self, menu, + (AwtToolkit::ComponentFactory)AwtMenu::Create); CATCH_BAD_ALLOC; }
--- a/src/windows/native/sun/windows/awt_Menu.h Tue May 09 03:09:51 2017 +0100 +++ b/src/windows/native/sun/windows/awt_Menu.h Tue May 09 04:03:50 2017 +0100 @@ -42,13 +42,6 @@ class AwtMenu : public AwtMenuItem { public: - // id's for methods executed on toolkit thread - enum { - MENU_ADDSEPARATOR = MENUITEM_LAST+1, - MENU_DELITEM, - MENU_LAST - }; - /* method ids for java.awt.Menu */ static jmethodID countItemsMID; static jmethodID getItemMID; @@ -61,7 +54,7 @@ virtual LPCTSTR GetClassName(); /* Create a new AwtMenu. This must be run on the main thread. */ - static AwtMenu* Create(jobject self, AwtMenu* parentMenu); + static AwtMenu* Create(jobject self, jobject parent); INLINE HMENU GetHMenu() { return m_hMenu; } INLINE void SetHMenu(HMENU hMenu) { @@ -94,9 +87,9 @@ void MeasureItem(HDC hDC, MEASUREITEMSTRUCT& measureInfo); void MeasureItems(HDC hDC, MEASUREITEMSTRUCT& measureInfo); - virtual LRESULT WinThreadExecProc(ExecuteArgs * args); - // invoked on Toolkit thread + static void _AddSeparator(void *param); + static void _DelItem(void *param); static void _CreateMenu(void *param); static void _CreateSubMenu(void *param); virtual BOOL IsSeparator() { return FALSE; }
--- a/src/windows/native/sun/windows/awt_MenuBar.cpp Tue May 09 03:09:51 2017 +0100 +++ b/src/windows/native/sun/windows/awt_MenuBar.cpp Tue May 09 04:03:50 2017 +0100 @@ -30,6 +30,12 @@ */ /***********************************************************************/ +// struct for _DelItem() method +struct DelItemStruct { + jobject menuitem; + jint index; +}; +/***********************************************************************/ // struct for _AddMenu() method struct AddMenuStruct { jobject menubar; @@ -130,18 +136,6 @@ return myFrame->GetHWnd(); } -void AwtMenuBar::SendDrawItem(AwtMenuItem* awtMenuItem, - DRAWITEMSTRUCT& drawInfo) -{ - awtMenuItem->DrawItem(drawInfo); -} - -void AwtMenuBar::SendMeasureItem(AwtMenuItem* awtMenuItem, - HDC hDC, MEASUREITEMSTRUCT& measureInfo) -{ - awtMenuItem->MeasureItem(hDC, measureInfo); -} - int AwtMenuBar::CountItem(jobject menuBar) { JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); @@ -159,13 +153,16 @@ } jobject menu = env->CallObjectMethod(target, AwtMenuBar::getMenuMID,index); + if (!menu) return NULL; // menu item was removed concurrently DASSERT(!safe_ExceptionOccurred(env)); jobject menuItemPeer = GetPeerForTarget(env, menu); PDATA pData; - JNI_CHECK_PEER_RETURN_NULL(menuItemPeer); - AwtMenuItem* awtMenuItem = (AwtMenuItem*)pData; + AwtMenuItem* awtMenuItem = NULL; + JNI_CHECK_PEER_GOTO(menuItemPeer, done); + awtMenuItem = (AwtMenuItem*)pData; +done: env->DeleteLocalRef(menu); env->DeleteLocalRef(menuItemPeer); @@ -212,20 +209,6 @@ VERIFY(::DrawMenuBar(GetOwnerHWnd())); } -LRESULT AwtMenuBar::WinThreadExecProc(ExecuteArgs * args) -{ - switch( args->cmdId ) { - case MENUBAR_DELITEM: - this->DeleteItem(static_cast<UINT>(args->param1)); - break; - - default: - AwtMenu::WinThreadExecProc(args); - break; - } - return 0L; -} - void AwtMenuBar::_AddMenu(void *param) { JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); @@ -254,6 +237,28 @@ delete ams; } +void AwtMenuBar::_DelItem(void *param) +{ + if (AwtToolkit::IsMainThread()) { + JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); + + DelItemStruct *dis = (DelItemStruct*) param; + jobject self = dis->menuitem; + jint index = dis->index; + + AwtMenuBar *m = NULL; + PDATA pData; + JNI_CHECK_PEER_GOTO(self, ret); + m = (AwtMenuBar *)pData; + m->DeleteItem(static_cast<UINT>(index)); +ret: + env->DeleteGlobalRef(self); + delete dis; + } else { + AwtToolkit::GetInstance().InvokeFunction(AwtMenuBar::_DelItem, param); + } +} + /************************************************************************ * MenuBar native methods */ @@ -322,9 +327,12 @@ { TRY; - PDATA pData; - JNI_CHECK_PEER_RETURN(self); - AwtObject::WinThreadExec(self, AwtMenuBar::MENUBAR_DELITEM, (LPARAM)index); + DelItemStruct *dis = new DelItemStruct; + dis->menuitem = env->NewGlobalRef(self); + dis->index = index; + + AwtToolkit::GetInstance().SyncCall(AwtMenuBar::_DelItem, dis); + // global refs and dis are deleted in _DelItem CATCH_BAD_ALLOC; } @@ -343,9 +351,6 @@ AwtToolkit::CreateComponent(self, frame, (AwtToolkit::ComponentFactory) AwtMenuBar::Create); - PDATA pData; - JNI_CHECK_PEER_CREATION_RETURN(self); - CATCH_BAD_ALLOC; }
--- a/src/windows/native/sun/windows/awt_MenuBar.h Tue May 09 03:09:51 2017 +0100 +++ b/src/windows/native/sun/windows/awt_MenuBar.h Tue May 09 04:03:50 2017 +0100 @@ -42,10 +42,6 @@ class AwtMenuBar : public AwtMenu { public: - // id's for methods executed on toolkit thread - enum MenuExecIds { - MENUBAR_DELITEM = MENU_LAST+1 - }; /* java.awt.MenuBar method ids */ static jmethodID getMenuCountMID; @@ -73,20 +69,15 @@ AwtMenuItem* GetItem(jobject target, long index); int CountItem(jobject menuBar); - void SendDrawItem(AwtMenuItem* awtMenuItem, - DRAWITEMSTRUCT& drawInfo); - void SendMeasureItem(AwtMenuItem* awtMenuItem, - HDC hDC, MEASUREITEMSTRUCT& measureInfo); void DrawItem(DRAWITEMSTRUCT& drawInfo); void MeasureItem(HDC hDC, MEASUREITEMSTRUCT& measureInfo); void AddItem(AwtMenuItem* item); void DeleteItem(UINT index); - virtual LRESULT WinThreadExecProc(ExecuteArgs * args); - // called on Toolkit thread static void _AddMenu(void *param); + static void _DelItem(void *param); protected: AwtFrame* m_frame; };
--- a/src/windows/native/sun/windows/awt_MenuItem.cpp Tue May 09 03:09:51 2017 +0100 +++ b/src/windows/native/sun/windows/awt_MenuItem.cpp Tue May 09 04:03:50 2017 +0100 @@ -50,6 +50,16 @@ jobject menuitem; jstring label; }; +// struct for _SetEnable() method +struct SetEnableStruct { + jobject menuitem; + jboolean isEnabled; +}; +// struct for _setState() method +struct SetStateStruct { + jobject menuitem; + jboolean isChecked; +}; /************************************************************************ * AwtMenuItem fields */ @@ -104,6 +114,7 @@ { if (m_freeId) { AwtToolkit::GetInstance().RemoveCmdID( GetID() ); + m_freeId = FALSE; } } void AwtMenuItem::Dispose() @@ -112,6 +123,7 @@ JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); if (m_peerObject != NULL) { + JNI_SET_DESTROYED(m_peerObject); JNI_SET_PDATA(m_peerObject, NULL); env->DeleteGlobalRef(m_peerObject); m_peerObject = NULL; @@ -205,13 +217,12 @@ if (env->EnsureLocalCapacity(1) < 0) { return NULL; } - PDATA pData; - JNI_CHECK_PEER_RETURN_NULL(menuPeer); + JNI_CHECK_NULL_RETURN_NULL(menuPeer, "peer"); /* target is a java.awt.MenuItem */ target = env->GetObjectField(peer, AwtObject::targetID); - AwtMenu* menu = (AwtMenu *)pData; + AwtMenu* menu = (AwtMenu *)JNI_GET_PDATA(menuPeer); item = new AwtMenuItem(); jboolean isCheckbox = (jboolean)env->GetBooleanField(peer, AwtMenuItem::isCheckboxID); @@ -222,7 +233,9 @@ item->LinkObjects(env, peer); item->SetMenuContainer(menu); item->SetNewID(); - menu->AddItem(item); + if (menu != NULL) { + menu->AddItem(item); + } } catch (...) { env->DeleteLocalRef(target); throw; @@ -763,30 +776,6 @@ } } -LRESULT AwtMenuItem::WinThreadExecProc(ExecuteArgs * args) -{ - switch( args->cmdId ) { - case MENUITEM_ENABLE: - { - BOOL isEnabled = (BOOL)args->param1; - this->Enable(isEnabled); - } - break; - - case MENUITEM_SETSTATE: - { - BOOL isChecked = (BOOL)args->param1; - this->SetState(isChecked); - } - break; - - default: - AwtObject::WinThreadExecProc(args); - break; - } - return 0L; -} - void AwtMenuItem::_SetLabel(void *param) { if (AwtToolkit::IsMainThread()) { JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); @@ -886,6 +875,53 @@ } } +void AwtMenuItem::_SetEnable(void *param) +{ + if (AwtToolkit::IsMainThread()) { + JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); + + SetEnableStruct *ses = (SetEnableStruct*) param; + jobject self = ses->menuitem; + jboolean isEnabled = ses->isEnabled; + + AwtMenuItem *m = NULL; + + PDATA pData; + JNI_CHECK_PEER_GOTO(self, ret); + + m = (AwtMenuItem *)pData; + + m->Enable(isEnabled); +ret: + env->DeleteGlobalRef(self); + delete ses; + } else { + AwtToolkit::GetInstance().InvokeFunction(AwtMenuItem::_SetEnable, param); + } +} + +void AwtMenuItem::_SetState(void *param) +{ + if (AwtToolkit::IsMainThread()) { + JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); + + SetStateStruct *sts = (SetStateStruct*) param; + jobject self = sts->menuitem; + jboolean isChecked = sts->isChecked; + + AwtMenuItem *m = NULL; + + PDATA pData; + JNI_CHECK_PEER_GOTO(self, ret); + m = (AwtMenuItem *)pData; + m->SetState(isChecked); +ret: + env->DeleteGlobalRef(self); + delete sts; + } else { + AwtToolkit::GetInstance().InvokeFunction(AwtMenuItem::_SetState, param); + } +} BOOL AwtMenuItem::IsSeparator() { JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); if (env->EnsureLocalCapacity(2) < 0) { @@ -1049,13 +1085,9 @@ { TRY; - JNI_CHECK_NULL_RETURN(menu, "null Menu"); AwtToolkit::CreateComponent(self, menu, (AwtToolkit::ComponentFactory) AwtMenuItem::Create); - PDATA pData; - JNI_CHECK_PEER_CREATION_RETURN(self); - CATCH_BAD_ALLOC; } @@ -1070,9 +1102,12 @@ { TRY; - PDATA pData; - JNI_CHECK_PEER_RETURN(self); - AwtObject::WinThreadExec(self, AwtMenuItem::MENUITEM_ENABLE, (LPARAM)on ); + SetEnableStruct *ses = new SetEnableStruct; + ses->menuitem = env->NewGlobalRef(self); + ses->isEnabled = on; + + AwtToolkit::GetInstance().SyncCall(AwtMenuItem::_SetEnable, ses); + // global refs and ses are deleted in _SetEnable CATCH_BAD_ALLOC; } @@ -1111,9 +1146,12 @@ { TRY; - PDATA pData; - JNI_CHECK_PEER_RETURN(self); - AwtObject::WinThreadExec(self, AwtMenuItem::MENUITEM_SETSTATE, (LPARAM)on); + SetStateStruct *sts = new SetStateStruct; + sts->menuitem = env->NewGlobalRef(self); + sts->isChecked = on; + + AwtToolkit::GetInstance().SyncCall(AwtMenuItem::_SetState, sts); + // global refs and sts are deleted in _SetState CATCH_BAD_ALLOC; }
--- a/src/windows/native/sun/windows/awt_MenuItem.h Tue May 09 03:09:51 2017 +0100 +++ b/src/windows/native/sun/windows/awt_MenuItem.h Tue May 09 04:03:50 2017 +0100 @@ -45,13 +45,6 @@ class AwtMenuItem : public AwtObject { public: - // id's for methods executed on toolkit thread - enum { - MENUITEM_ENABLE, - MENUITEM_SETSTATE, - MENUITEM_LAST - }; - /* java.awt.MenuComponent fields */ static jfieldID fontID; static jfieldID appContextID; @@ -154,13 +147,14 @@ */ MsgRouting WmNotify(UINT notifyCode); - virtual LRESULT WinThreadExecProc(ExecuteArgs * args); virtual BOOL IsDisabledAndPopup() { return FALSE; } virtual BOOL IsSeparator(); // invoked on Toolkit thread + static void _SetState(void *param); + static void _SetEnable(void *param); static void _SetLabel(void *param); static void _UpdateLayout(void *param);
--- a/src/windows/native/sun/windows/awt_PopupMenu.cpp Tue May 09 03:09:51 2017 +0100 +++ b/src/windows/native/sun/windows/awt_PopupMenu.cpp Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2016, 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 @@ -65,7 +65,7 @@ } /* Create a new AwtPopupMenu object and menu. */ -AwtPopupMenu* AwtPopupMenu::Create(jobject self, AwtComponent* parent) +AwtPopupMenu* AwtPopupMenu::Create(jobject self, jobject parent) { JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); @@ -77,6 +77,9 @@ return NULL; } + JNI_CHECK_NULL_GOTO(parent, "peer", done); + AwtComponent* awtParent = (AwtComponent*) JNI_GET_PDATA(parent); + target = env->GetObjectField(self, AwtObject::targetID); JNI_CHECK_NULL_GOTO(target, "null target", done); @@ -94,7 +97,7 @@ popupMenu->SetHMenu(hMenu); popupMenu->LinkObjects(env, self); - popupMenu->SetParent(parent); + popupMenu->SetParent(awtParent); } catch (...) { env->DeleteLocalRef(target); throw; @@ -274,12 +277,8 @@ { TRY; - PDATA pData; - JNI_CHECK_PEER_RETURN(parent); - AwtComponent* awtParent = (AwtComponent *)pData; AwtToolkit::CreateComponent( - self, awtParent, (AwtToolkit::ComponentFactory)AwtPopupMenu::Create, FALSE); - JNI_CHECK_PEER_CREATION_RETURN(self); + self, parent, (AwtToolkit::ComponentFactory)AwtPopupMenu::Create); CATCH_BAD_ALLOC; }
--- a/src/windows/native/sun/windows/awt_PopupMenu.h Tue May 09 03:09:51 2017 +0100 +++ b/src/windows/native/sun/windows/awt_PopupMenu.h Tue May 09 04:03:50 2017 +0100 @@ -47,7 +47,7 @@ virtual LPCTSTR GetClassName(); /* Create a new AwtPopupMenu. This must be run on the main thread. */ - static AwtPopupMenu* Create(jobject self, AwtComponent* parent); + static AwtPopupMenu* Create(jobject self, jobject parent); /* Display the popup modally. */ void Show(JNIEnv *env, jobject event, BOOL isTrayIconPopup);
--- a/src/windows/native/sun/windows/awt_new.cpp Tue May 09 03:09:51 2017 +0100 +++ b/src/windows/native/sun/windows/awt_new.cpp Tue May 09 04:03:50 2017 +0100 @@ -172,6 +172,9 @@ env->ExceptionClear(); // rethrow exception env->Throw(xcp); + // temp solution to reveal all concurrency issues in jtreg and JCK + // we will switch it back to silent mode before the release + env->ExceptionDescribe(); return xcp; } }
--- a/test/TEST.groups Tue May 09 03:09:51 2017 +0100 +++ b/test/TEST.groups Tue May 09 04:03:50 2017 +0100 @@ -398,6 +398,7 @@ javax/management/mxbean/LeakTest.java \ javax/management/mxbean/MXBeanTest.java \ javax/management/mxbean/PropertyNamesTest.java \ + javax/xml/bind/marshal/8134111/UnmarshalTest.java \ javax/xml/ws/8043129 \ jdk/lambda/vm/InterfaceAccessFlagsTest.java \ sun/misc/URLClassPath/ClassnameCharTest.java \ @@ -570,6 +571,7 @@ java/net/HttpCookie/IllegalCookieNameTest.java \ java/net/HttpURLConnection/UnmodifiableMaps.java \ java/net/ResponseCache/Test.java \ + java/net/SetFactoryPermission/SetFactoryPermission.java \ java/net/URLClassLoader/ClassLoad.java \ java/net/URLClassLoader/closetest/CloseTest.java \ java/net/URLPermission/URLTest.java \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/java/awt/Frame/FrameResize/ShowChildWhileResizingTest.java Tue May 09 04:03:50 2017 +0100 @@ -0,0 +1,88 @@ +/* + * 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 8079595 + @summary Resizing dialog which is JWindow parent makes JVM crash + @author Semyon Sadetsky + */ + +import javax.swing.*; +import java.awt.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.InputEvent; + +public class ShowChildWhileResizingTest { + + private static Window dialog; + private static Timer timer; + private static Point point; + + public static void main(String[] args) throws Exception { + dialog = new Frame(); + dialog.add(new JPanel()); + dialog.setVisible(true); + dialog.setBounds(100, 100, 200, 200); + SwingUtilities.invokeAndWait(new Runnable() { + @Override + public void run() { + final Window dependentWindow = new JWindow(dialog); + JPanel panel = new JPanel(); + panel.add(new JButton("button")); + dependentWindow.add(panel); + dependentWindow.setVisible(true); + dependentWindow.setBounds(0, 0, 50, 50); + timer = new Timer(100, new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + dependentWindow + .setVisible(!dependentWindow.isVisible()); + } + }); + timer.start(); + } + + }); + + Robot robot = new Robot(); + robot.setAutoDelay(5); + robot.delay(300); + SwingUtilities.invokeAndWait(new Runnable() { + @Override + public void run() { + point = dialog.getLocationOnScreen(); + } + }); + robot.mouseMove(point.x + 200 - dialog.getInsets().right/2, + point.y + 200 - dialog.getInsets().bottom/2); + robot.mousePress(InputEvent.BUTTON1_MASK); + for(int i = 0; i < 100; i++) { + robot.mouseMove(point.x + 200 + i, point.y + 200 + i); + } + robot.mouseRelease(InputEvent.BUTTON1_MASK); + timer.stop(); + dialog.dispose(); + System.out.println("ok"); + } +}
--- a/test/java/io/Serializable/serialFilter/SerialFilterTest.java Tue May 09 03:09:51 2017 +0100 +++ b/test/java/io/Serializable/serialFilter/SerialFilterTest.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2016, 2017, 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 @@ -33,10 +33,11 @@ import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Proxy; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.Hashtable; -import java.util.Set; +import java.util.List; import java.util.concurrent.atomic.LongAdder; import sun.misc.ObjectInputFilter; @@ -155,26 +156,33 @@ Runnable runnable = (Runnable & Serializable) SerialFilterTest::noop; Object[][] objects = { { null, 0, -1, 0, 0, 0, - new HashSet<>()}, // no callback, no values - { objArray, 3, 7, 8, 2, 55, - new HashSet<>(Arrays.asList(objArray.getClass()))}, - { Object[].class, 1, -1, 1, 1, 40, - new HashSet<>(Arrays.asList(Object[].class))}, - { new SerialFilterTest(), 1, -1, 1, 1, 37, - new HashSet<>(Arrays.asList(SerialFilterTest.class))}, - { new LongAdder(), 2, -1, 1, 1, 93, - new HashSet<>(Arrays.asList(LongAdder.class, serClass))}, - { new byte[14], 2, 14, 1, 1, 27, - new HashSet<>(Arrays.asList(byteArray.getClass()))}, - { runnable, 13, 0, 10, 2, 514, - new HashSet<>(Arrays.asList(java.lang.invoke.SerializedLambda.class, + Arrays.asList()}, // no callback, no values + { objArray, 3, 7, 9, 2, 55, + Arrays.asList(objArray.getClass(), objArray.getClass())}, + { Object[].class, 1, -1, 1, 1, 38, + Arrays.asList(Object[].class)}, + { new SerialFilterTest(), 1, -1, 1, 1, 35, + Arrays.asList(SerialFilterTest.class)}, + { new LongAdder(), 2, -1, 2, 1, 93, + Arrays.asList(serClass, LongAdder.class)}, + { new byte[14], 2, 14, 2, 1, 27, + Arrays.asList(byteArray.getClass(), byteArray.getClass())}, + { runnable, 13, 0, 13, 2, 514, + Arrays.asList(java.lang.invoke.SerializedLambda.class, + objArray.getClass(), + objArray.getClass(), SerialFilterTest.class, - objArray.getClass()))}, - { deepHashSet(10), 48, -1, 49, 11, 619, - new HashSet<>(Arrays.asList(HashSet.class))}, - { proxy.getClass(), 3, -1, 1, 1, 114, - new HashSet<>(Arrays.asList(Runnable.class, - java.lang.reflect.Proxy.class))}, + java.lang.invoke.SerializedLambda.class)}, + { deepHashSet(10), 48, -1, 50, 11, 619, + Arrays.asList(HashSet.class)}, + { proxy.getClass(), 3, -1, 2, 2, 112, + Arrays.asList(Runnable.class, + java.lang.reflect.Proxy.class, + java.lang.reflect.Proxy.class)}, + { new F(), 6, -1, 6, 6, 202, + Arrays.asList(F.class, E.class, D.class, + C.class, B.class, A.class)}, + }; return objects; } @@ -213,11 +221,12 @@ @Test(dataProvider="Objects") public static void t1(Object object, long count, long maxArray, long maxRefs, long maxDepth, long maxBytes, - Set<Class<?>> classes) throws IOException { + List<Class<?>> classes) throws IOException { byte[] bytes = writeObjects(object); Validator validator = new Validator(); validate(bytes, validator); System.out.printf("v: %s%n", validator); + Assert.assertEquals(validator.count, count, "callback count wrong"); Assert.assertEquals(validator.classes, classes, "classes mismatch"); Assert.assertEquals(validator.maxArray, maxArray, "maxArray mismatch"); @@ -411,7 +420,7 @@ */ static class Validator implements ObjectInputFilter { long count; // Count of calls to checkInput - HashSet<Class<?>> classes = new HashSet<>(); + List<Class<?>> classes = new ArrayList<>(); long maxArray = -1; long maxRefs; long maxDepth; @@ -422,16 +431,20 @@ @Override public ObjectInputFilter.Status checkInput(FilterInfo filter) { + Class<?> serialClass = filter.serialClass(); + System.out.printf(" checkInput: class: %s, arrayLen: %d, refs: %d, depth: %d, bytes; %d%n", + serialClass, filter.arrayLength(), filter.references(), + filter.depth(), filter.streamBytes()); count++; - if (filter.serialClass() != null) { - if (filter.serialClass().getName().contains("$$Lambda$")) { + if (serialClass != null) { + if (serialClass.getName().contains("$$Lambda$")) { // TBD: proper identification of serialized Lambdas? // Fold the serialized Lambda into the SerializedLambda type classes.add(SerializedLambda.class); - } else if (Proxy.isProxyClass(filter.serialClass())) { + } else if (Proxy.isProxyClass(serialClass)) { classes.add(Proxy.class); } else { - classes.add(filter.serialClass()); + classes.add(serialClass); } } @@ -591,7 +604,8 @@ // a stream of exactly the size requested. return genMaxBytesObject(allowed, value); } else if (pattern.startsWith("maxrefs=")) { - Object[] array = new Object[allowed ? (int)value - 1 : (int)value]; + // 4 references to classes in addition to the array contents + Object[] array = new Object[allowed ? (int)value - 4 : (int)value - 3]; for (int i = 0; i < array.length; i++) { array[i] = otherObject; } @@ -740,4 +754,25 @@ return streamBytes; } } + + // Deeper superclass hierarchy + static class A implements Serializable { + private static final long serialVersionUID = 1L; + }; + static class B extends A { + private static final long serialVersionUID = 2L; + } + static class C extends B { + private static final long serialVersionUID = 3L; + } + static class D extends C { + private static final long serialVersionUID = 4L; + } + static class E extends D { + private static final long serialVersionUID = 5L; + } + static class F extends E { + private static final long serialVersionUID = 6L; + } + }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/java/lang/Thread/ITLConstructor.java Tue May 09 04:03:50 2017 +0100 @@ -0,0 +1,107 @@ +/* + * 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 + * @summary Basic test for Thread(ThreadGroup,Runnable,String,long,boolean) + */ + +import sun.misc.SharedSecrets; + +import java.security.AccessControlContext; +import java.security.AccessController; +import java.security.PrivilegedAction; + +public class ITLConstructor { + static InheritableThreadLocal<Integer> n = new InheritableThreadLocal<Integer>() { + protected Integer initialValue() { + return 0; + } + + protected Integer childValue(Integer parentValue) { + return parentValue + 1; + } + }; + + static final int CHILD_THREAD_COUNT = 10; + + public static void main(String args[]) throws Exception { + test(); + } + + static void test() throws Exception { + // concurrent access to separate indexes is ok + int[] x = new int[CHILD_THREAD_COUNT]; + Thread child = createThread(new AnotherRunnable(0, x)); + child.start(); + child.join(); // waits for *all* threads to complete + + // Check results + for(int i=0; i<CHILD_THREAD_COUNT; i++) { + int expectedValue = 1; + if (x[i] != expectedValue) + throw (new Exception("Got x[" + i + "] = " + x[i] + + ", expected: " + expectedValue)); + } + } + + static class AnotherRunnable implements Runnable { + final int threadId; + final int[] x; + AnotherRunnable(int threadId, int[] x) { + this.threadId = threadId; + this.x = x; + } + + public void run() { + int itlValue = n.get(); + + if (threadId < CHILD_THREAD_COUNT-1) { + Thread child = createThread( + new AnotherRunnable(threadId+1, x)); + child.start(); + try { + child.join(); + } catch(InterruptedException e) { + throw(new RuntimeException("Interrupted", e)); + } + } + + x[threadId] = itlValue+1; + } + } + + static Thread createThread(final Runnable r) { + final AccessControlContext acc = AccessController.getContext(); + // 4290486: doPrivileged is needed to create a thread in + // an environment that restricts "modifyThreadGroup". + return AccessController.doPrivileged( + new PrivilegedAction<Thread>() { + public Thread run() { + return SharedSecrets.getJavaLangAccess() + .newThreadWithAcc(r, acc); + } + } + ); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/javax/swing/regtesthelpers/JRobot.java Tue May 09 04:03:50 2017 +0100 @@ -0,0 +1,294 @@ +/* + * Copyright (c) 2007, 2016, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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. + */ + +/** + * JRobot is a wrapper around java.awt.Robot that provides some convenience + * methods. + * <p>When using jtreg you would include this class via something like: + * <pre> + * @library ../../../regtesthelpers + * @build JRobot + * </pre> + * + */ +import java.awt.AWTException; +import java.awt.Component; +import java.awt.Dimension; +import java.awt.EventQueue; +import java.awt.Point; +import java.awt.Rectangle; +import java.awt.event.InputEvent; +import java.awt.event.KeyEvent; +import javax.swing.SwingUtilities; + +public class JRobot extends java.awt.Robot { + private static int DEFAULT_DELAY = 550; + private static int INTERNAL_DELAY = 250; + + private int delay; + private boolean delaysEnabled; + + protected JRobot(boolean enableDelays) throws AWTException { + super(); + delaysEnabled = enableDelays; + setAutoWaitForIdle(enableDelays); + if (enableDelays) { + setAutoDelay(INTERNAL_DELAY); + setDelay(DEFAULT_DELAY); + } + } + + /** + * Return a JRobot. Delays are enabled by default. + * @return a JRobot + */ + public static JRobot getRobot() { + return getRobot(true); + } + + /** + * Create a JRobot. The parameter controls whether delays are enabled. + * @param enableDelays controls whether delays are enabled. + * @return a JRobot + */ + public static JRobot getRobot(boolean enableDelays) { + JRobot robot = null; + try { + robot = new JRobot(enableDelays); + } catch (AWTException e) { + System.err.println("Coudn't create Robot, details below"); + throw new Error(e); + } + return robot; + } + + /** + * Press and release a key. + * @param keycode which key to press. For example, KeyEvent.VK_DOWN + */ + public void hitKey(int keycode) { + keyPress(keycode); + keyRelease(keycode); + delay(); + } + + /** + * Press and release a key with modifiers. + * @param keys keys to press. Keys are pressed in order they are passed as + * parameters to this method. All keys except the last one are considered + * modifiers. For example, to press Ctrl+Shift+T, call: + * hitKey(KeyEvent.VK_CONTROL, KeyEvent.VK_SHIFT, KeyEvent.VK_T); + */ + public void hitKey(int... keys) { + for (int i = 0; i < keys.length; i++) { + keyPress(keys[i]); + } + + for (int i = keys.length - 1; i >= 0; i--) { + keyRelease(keys[i]); + } + delay(); + } + + /** + * Move mouse cursor to the center of the Component. + * @param c Component the mouse is placed over + */ + public void moveMouseTo(Component c) { + Point p = c.getLocationOnScreen(); + Dimension size = c.getSize(); + p.x += size.width / 2; + p.y += size.height / 2; + mouseMove(p.x, p.y); + delay(); + } + + /** + * Move mouse smoothly from (x0, y0) to (x1, y1). + */ + public void glide(int x0, int y0, int x1, int y1) { + float dmax = (float)Math.max(Math.abs(x1 - x0), Math.abs(y1 - y0)); + float dx = (x1 - x0) / dmax; + float dy = (y1 - y0) / dmax; + + mouseMove(x0, y0); + for (int i=1; i<=dmax; i++) { + mouseMove((int)(x0 + dx*i), (int)(y0 + dy*i)); + } + delay(); + } + + /** + * Perform a mouse click, i.e. press and release mouse button(s). + * @param buttons mouse button(s). + * For example, MouseEvent.BUTTON1_MASK + */ + public void clickMouse(int buttons) { + mousePress(buttons); + mouseRelease(buttons); + delay(); + } + + /** + * Perform a click with the first mouse button. + */ + public void clickMouse() { + clickMouse(InputEvent.BUTTON1_MASK); + } + + /** + * Click in the center of the given Component + * @param c the Component to click on + * @param buttons mouse button(s). + */ + public void clickMouseOn(Component c, int buttons) { + moveMouseTo(c); + clickMouse(buttons); + } + + /** + * Click the first mouse button in the center of the given Component + * @param c the Component to click on + */ + public void clickMouseOn(Component c) { + clickMouseOn(c, InputEvent.BUTTON1_MASK); + } + + /** + * Return whether delays are enabled + * @return whether delays are enabled + */ + public boolean getDelaysEnabled() { + return delaysEnabled; + } + + /** + * Delay execution by delay milliseconds + */ + public void delay() { + delay(delay); + } + + /** + * Return the delay amount, in milliseconds + */ + public int getDelay() { + return delay; + } + + /** + * Set the delay amount, in milliseconds + */ + public void setDelay(int delay) { + this.delay = delay; + } + + /** + * Waits until all events currently on the event queue have been processed. + * Does nothing if called on EDT + */ + public synchronized void waitForIdle() { + if (!EventQueue.isDispatchThread()) { + super.waitForIdle(); + } + } + + /** + * Calculate the center of the Rectangle passed, and return them + * in a Point object. + * @param r a non-null Rectangle + * @return a new Point object containing coordinates of r's center + */ + public Point centerOf(Rectangle r) { + return new Point(r.x + r.width / 2, r.y + r.height / 2); + } + + /** + * Calculate the center of the Rectangle passed, and store it in p. + * @param r a non-null Rectangle + * @param p a non-null Point that receives coordinates of r's center + * @return p + */ + public Point centerOf(Rectangle r, Point p) { + p.x = r.x + r.width / 2; + p.y = r.y + r.height / 2; + return p; + } + + /** + * Convert a rectangle from coordinate system of Component c to + * screen coordinate system. + * @param r a non-null Rectangle + * @param c a Component whose coordinate system is used for conversion + */ + public void convertRectToScreen(Rectangle r, Component c) { + Point p = new Point(r.x, r.y); + SwingUtilities.convertPointToScreen(p, c); + r.x = p.x; + r.y = p.y; + } + + /** + * Compares two rectangles pixel-by-pixel. + * @param r0 the first area + * @param r1 the second area + * return true if all pixels in the two areas are identical + */ + public boolean compareRects(Rectangle r0, Rectangle r1) { + int xShift = r1.x - r0.x; + int yShift = r1.y - r0.y; + + for (int y = r0.y; y < r0.y + r0.height; y++) { + for (int x = r0.x; x < r0.x + r0.width; x++) { + if (!comparePixels(x, y, x + xShift, y + yShift)) { + return false; + } + } + } + return true; + } + + /** + * Compares colors of two points on the screen. + * @param p0 the first point + * @param p1 the second point + * return true if the two points have the same color + */ + public boolean comparePixels(Point p0, Point p1) { + return comparePixels(p0.x, p0.y, p1.x, p1.y); + } + + /** + * Compares colors of two points on the screen. + * @param x0 the x coordinate of the first point + * @param y0 the y coordinate of the first point + * @param x1 the x coordinate of the second point + * @param y1 the y coordinate of the second point + * return true if the two points have the same color + */ + public boolean comparePixels(int x0, int y0, int x1, int y1) { + return (getPixelColor(x0, y0).equals(getPixelColor(x1, y1))); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/javax/swing/regtesthelpers/SwingTestHelper.java Tue May 09 04:03:50 2017 +0100 @@ -0,0 +1,862 @@ +/* + * Copyright (c) 2007, 2016, 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. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * 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. + */ + +import java.awt.*; +import java.awt.event.*; +import java.beans.*; +import java.lang.reflect.*; +import java.util.*; + +import javax.swing.*; + +/** + * SwingTestHelper is a utility class for writing AWT/Swing regression + * tests that require interacting with the UI. Typically such tests + * consist of executing a chunk of code, waiting on an event, executing + * more code ... This is painful in that you typically have to use various + * invokeLaters and threading to handle that interaction. SwingTestHelper + * strealines this process. + * <p> + * SwingTestHelper uses reflection to invoke all methods starting with + * the name <code>onEDT</code> on the EDT and all methods starting with + * <code>onBackgroundThread</code> on a background thread. Between each method + * invocation all pending events on the EDT are processed. The methods + * are first sorted based on an integer after the method names and invoked + * in that order. For example, the following subclass: + * <pre> + * class Test extends SwingTestHelper { + * private void onEDT10(); + * private void onBackgroundThread20(); + * private void onBackgroundThread30(); + * private void onEDT40(); + * private void onBackgroundThread50(); + * } + * </pre> + * Will have the methods invoked in the order <code>onEDT10</code>, + * <code>onBackgroundThread20</code>, <code>onBackgroundThread30</code>, + * <code>onEDT40</code>, <code>onBackgroundThread50</code>. + * <p> + * If you're not happy with method mangling you can also use annotations. + * The following gives the same result as the previous example: + * <pre> + * class Test extends SwingTestHelper { + * @Test(10) + * private void foo(); // Was onEDT10 + * + * @Test(value=20, onEDT=false) + * private void bar(); // Was onBackgroundThread20 + * + * @Test(value=30, onEDT=false) + * private void baz(); // Was onBackgroundThread30 + * + * @Test(40) + * private void zed(); // Was onEDT40 + * + * @Test(value=50, onEDT=false) + * private void onBackgroundThread50(); // Was onBackgroundThread50 + * } + * </pre> + * <p> + * It is recommended that you increment the value in increments of + * 10. This makes it easier to add methods at a later date without + * having to change all method names/annotations after the newly added + * method. + * <p> + * Between each of the methods, all pending events (native and Java) + * are processed. + * <p> + * Failure of the test is signaled by any method throwing + * an exception, directly invoking <code>fail</code> or one of the + * <code>assert</code> variants. If no methods throw an exception the test is + * assumed to have passed. + * <p> + * Often times it is necessary to block until focus has been gained on a + * particular widget. This can be handled by the + * <code>requestAndWaitForFocus</code> method. It will invoke + * <code>requestFocus</code> and block the test (not the EDT) until focus + * has been granted to the widget. + * <p> + * Care must be taken when using <code>Robot</code> directly. For + * example, it's tempting to flood <code>Robot</code> with events and + * assume they will be received after some delay. Depending upon the + * machine you may need to increase the delay. Instead it's + * preferrable to block test execution until the event has been + * received and processed. This can be done using the method + * <code>waitForEvent</code>. For example, to block until a key typed + * event has been processed do the following: + * <pre> + * private void onEDT() { + * robot.moveMouseTo(myComponent); + * robot.mousePress(xxx); + * robot.mouseRelease(xxx); + * waitForEvent(myComponent, MouseEvent.MOUSE_RELEASED); + * } + * </pre> + * <p> + * Waiting for focus and events are specific examples of a more + * general problem. Often times you need the EDT to continue processing + * events, but want to block test execution until something happens. + * In the case of focus you want to block test execution until focus + * is gained. The method <code>waitForCondition</code> can be used to + * block test execution until the supplied <code>Runnable</code> returns. The + * <code>Runnable</code> is invoked on the background thread. + * <p> + * To use this class you will need to do the following: + * <ol> + * <li>Override the method <code>createContentPane</code>. All of your logic + * for setting up the test environment should go here. This method is + * invoked on the EDT. + * <li>Implement the necessary <code>onEDTXX</code> and + * <code>onBackgroundThreadXXX</code> methods to do the actual testing. + * <li>Make your <code>main</code> method look like: + * <code>new MySwingTestHelper().run(args)</code>. This will block + * until the test fails or succeeds. + * <li>To use this with jtreg you'll need to have something like: + * <pre> + * @library ../../../regtesthelpers + * @build Test JRobot Assert SwingTestHelper + * @run main MySwingTestHelper + * * </pre> + * </ol> + * <p> + * Here's a complete example: + * <pre> + * public class bug4852305 extends SwingTestHelper { + * private JTable table; + * + * public static void main(String[] args) throws Throwable { + * new bug4852305().run(args); + * } + * + * protected Component createContentPane() { + * DefaultTableModel model = new DefaultTableModel(1, 2); + * model.setValueAt("x", 0, 0); + * model.setValueAt("z", 0, 1); + * table = new JTable(model); + * table.setDefaultEditor(Object.class, new DefaultCellEditor(new JTextField()) { + * public boolean isCellEditable(EventObject anEvent) { + * if ((anEvent instanceof KeyEvent) || + * (anEvent instanceof ActionEvent)) { + * return false; + * } + * return true; + * } + * }); + * return new JScrollPane(table); + * } + * + * private void onEDT10() { + * requestAndWaitForFocus(table); + * } + * + * private void onEDT20() { + * robot.keyPress(KeyEvent.VK_A); + * robot.keyRelease(KeyEvent.VK_A); + * waitForEvent(table, KeyEvent.KEY_RELEASED); + * } + * + * private void onEDT30() { + * if (table.isEditing()) { + * fail("Should not be editing"); + * } + * } + * } + * </pre> + * + * + * @author Scott Violet + */ +public abstract class SwingTestHelper { + private static final String ON_EDT_METHOD_NAME = "onEDT"; + private static final String IN_BACKGROUND_METHOD_NAME = "onBackgroundThread"; + + // Whether or not we've installed a PropertyChangeListener on the + // KeyboardFocusManager + private boolean installedFocusListener; + // Component currently blocking on until focus has been received. + private Component componentWaitingForFocus; + + // Set to true when done. + private boolean done; + // If failed, this gives the exception. Only the first exception is + // kept. + private Throwable error; + + // List of methods to invoke + private java.util.List<Method> methods; + + // The conditions the background thread is blocked on. + private java.util.List<Runnable> conditions; + + // Whether or not we've installed the AWTEventListener + private boolean installedEventListener; + + /** + * Instance of <code>Robot</code> returned from <code>createRobot</code>. + */ + protected JRobot robot; + + /** + * <code>Window</code> returned from <code>createWindow</code>. + */ + protected Window window; + + // Listens for the first paint event + private AWTEventListener paintListener; + // Whether or not we've received a paint event. + private boolean receivedFirstPaint; + + // used if the user wants to slow down method processing + private PauseCondition delay = null; + + private boolean showProgress; + private JProgressBar progBar; + + + public SwingTestHelper() { + paintListener = new AWTEventListener() { + public void eventDispatched(AWTEvent ev) { + if ((ev.getID() & PaintEvent.PAINT) != 0 && + ev.getSource() == window) { + synchronized(SwingTestHelper.this) { + if (receivedFirstPaint) { + return; + } + receivedFirstPaint = true; + } + Toolkit.getDefaultToolkit().removeAWTEventListener( + paintListener); + startControlLoop(); + } + } + }; + Toolkit.getDefaultToolkit().addAWTEventListener( + paintListener, AWTEvent.PAINT_EVENT_MASK); + } + + /** + * Sets whether SwingTestHelper should use {@code SunToolkit.realSync} + * to wait for events to finish, or {@code Robot.waitForIdle}. The default + * is to use realSync. + * Nov 2014: no realSync any more, just robot.waitForIdle which actually + * _is_ realSync on all platforms but OS X (and thus cannot be used on EDT). + */ + public void setUseRealSync(boolean useRealSync) { + //NOOP + } + + /** + * Set the amount of time to delay between invoking methods in + * the control loop. Useful to slow down testing. + */ + protected void setDelay(int delay) { + if (delay <= 0) { + this.delay = null; + } else { + this.delay = new PauseCondition(delay); + } + } + + /** + * Sets whether or not progress through the list of methods is + * shown by a progress bar at the bottom of the window created + * by {@code createWindow}. + */ + protected void setShowProgress(boolean showProgress) { + this.showProgress = showProgress; + } + + /** + * Creates and returns the <code>Window</code> for the test. This + * implementation returns a JFrame with a default close operation + * of <code>EXIT_ON_CLOSE</code>. The <code>Component</code> + * returned from <code>createContentPane</code> is added the + * <code>JFrame</code> and the the frame is packed. + * <p> + * Typically you only need override <code>createContentPane</code>. + */ + protected Window createWindow() { + JFrame frame = new JFrame("Test: " + getClass().getName()); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.add(createContentPane()); + if (showProgress) { + progBar = new JProgressBar(); + progBar.setString(""); + progBar.setStringPainted(true); + frame.add(progBar, BorderLayout.SOUTH); + } + frame.pack(); + return frame; + } + + /** + * Returns the <code>Component</code> to place in the frame. + * Override this or the <code>createWindow</code> method. + */ + protected Component createContentPane() { + return null; + } + + /** + * Invokes <code>requestFocus</code> on the passed in component (assuming + * it doesn't already have focus). Test execution is blocked until focus + * has been gained on the component. This method <b>must</b> be invoked + * on the EDT, if you do not invoke it from the edt the test will fail. + * + * @param c the <code>Component</code> to wait for focus on + */ + protected void requestAndWaitForFocus(Component c) { + requestAndWaitForFocus(c, true); + } + + /** + * Blocks test execution until focus is gained on the component. + * This method <b>must</b> be invoked + * on the EDT, if you do not invoke it from the edt the test will fail. + */ + protected void waitForFocusGained(Component c) { + requestAndWaitForFocus(c, false); + } + + private void requestAndWaitForFocus(Component c, boolean requestFocus) { + if (!EventQueue.isDispatchThread()) { + System.out.println( + "requestAndWaitForFocus should be invoked on EDT"); + throw new RuntimeException(); + } + if (componentWaitingForFocus != null) { + System.out.println("Already waiting for focus"); + throw new RuntimeException(); + } + if (!installedFocusListener) { + installedFocusListener = true; + KeyboardFocusManager.getCurrentKeyboardFocusManager(). + addPropertyChangeListener(new FocusListener()); + } + synchronized(this) { + if (c.hasFocus()) { + return; + } + componentWaitingForFocus = c; + } + if (requestFocus) { + c.requestFocus(); + } + waitForCondition(new FocusCondition()); + } + + /** + * Blocks test execution until the specified event has been received. + * This method immediately returns and the EDT will continue to + * process events, but test execution is blocked until + * the event is received. + * + * @param event the event type to wait for + */ + protected void waitForEvent(int event) { + waitForEvent(null, event); + } + + /** + * Blocks test execution until the specified event has been received. + * This method immediately returns and the EDT will continue to + * process events, but test execution is blocked until + * the event is received. + * + * @param target the <code>Component</code> to wait for the event on; + * <code>null</code> indicates it does not matter which + * component the event is received on + * @param event the event type to wait for + */ + protected void waitForEvent(Component target, int event) { + waitForCondition(new EventCondition(target, event)); + if (!installedEventListener) { + installedEventListener = true; + Toolkit.getDefaultToolkit().addAWTEventListener( + new EventListener(), 0xFFFFFFFFFFFFFFFFl); + } + } + + /** + * Paused test execution for the specified amount of time. The caller + * immediately returns and the EDT can process events. + * + * @param time the amount of time, in milliseconds, to pause for + */ + protected void pause(int time) { + waitForCondition(new PauseCondition(time)); + } + + /** + * Schedules a <code>Runnable</code> that will be processed in the + * background thread. This method immediately returns, and the + * EDT is free to continue processing events. Test execution is + * blocked until the <code>Runnable</code> completes. + */ + protected void waitForCondition(Runnable runnable) { + synchronized(this) { + if (conditions == null) { + conditions = new LinkedList<Runnable>(); + } + conditions.add(runnable); + } + } + + /** + * Runs the test. This method blocks the caller until the test + * fails or succeeds. Recognized arguments are: + * <p> + * "-exit": Causes main to exit when the test is done. + * "-showProg": Indicate the progress of the test with a + * progress bar in the main window. Only works + * if the test hasn't overridden {@code createWindow}. + * "-delay int": Sets the delay between executing methods. + * Useful when you want to slow a test to watch it. + * + * @param args the arguments from main, it's ok to pass in null + */ + protected final void run(String[] args) throws Throwable { + boolean exit = false; + if (args != null) { + for (int i = 0; i < args.length; i++) { + if (args[i].equals("-exit")) { + exit = true; + } else if (args[i].equals("-delay")) { + try { + setDelay(Integer.parseInt(args[++i])); + } catch (NumberFormatException ne) { + throw new RuntimeException("-delay requires an integer value"); + } catch (ArrayIndexOutOfBoundsException ae) { + throw new RuntimeException("-delay requires an integer value"); + } + } else if (args[i].equals("-showProg")) { + setShowProgress(true); + } else { + throw new RuntimeException("Invalid argument \"" + args[i] + "\""); + } + } + } + + createWindow0(); + synchronized(this) { + while(!done) { + wait(); + } + } + if (exit) { + // Not in harness + if (error != null) { + System.out.println("FAILED: " + error); + error.printStackTrace(); + } + System.exit(0); + } + if (error != null) { + throw error; + } + } + + /** + * Creates the window, on the EDT. + */ + private void createWindow0() { + EventQueue.invokeLater(new Runnable() { + public void run() { + window = createWindow(); + window.show(); + } + }); + } + + /** + * Initializes the progress bar if necessary. + */ + private void initProgressBar(final int size) { + EventQueue.invokeLater(new Runnable() { + public void run() { + if (progBar != null) { + progBar.setMaximum(size); + } + } + }); + } + + /** + * Starst the control loop. + */ + private void startControlLoop() { + robot = createRobot(); + if (robot != null) { + calculateMethods(); + initProgressBar(methods.size()); + new Thread(new Runnable() { + public void run() { + controlLoop(); + } + }).start(); + } + } + + /** + * Increment the progress bar. + */ + private void nextProgress(final String name) { + EventQueue.invokeLater(new Runnable() { + public void run() { + if (progBar != null) { + progBar.setString(name); + progBar.setValue(progBar.getValue() + 1); + } + } + }); + } + + private synchronized Runnable currentCondition() { + if (conditions != null && conditions.size() > 0) { + return conditions.get(0); + } + return null; + } + + private synchronized Runnable nextCondition() { + return conditions.remove(0); + } + + private void controlLoop() { + int methodIndex = 0; + while (methodIndex < methods.size()) { + // Wait for any pending conditions + Runnable condition; + while ((condition = currentCondition()) != null) { + try { + condition.run(); + } catch (Exception e) { + fail(e); + return; + } + waitForEDTToFinish(); + synchronized(this) { + if (done) { + return; + } + } + // Advance to next condition + nextCondition(); + } + + // Let all events on the EDT finish + waitForEDTToFinish(); + + if (delay != null) { + delay.run(); + } + + // Invoke the next method + Method method = methods.get(methodIndex++); + Test test = method.getAnnotation(Test.class); + boolean onEDT = true; + if (test != null) { + onEDT = test.onEDT(); + } + else if (!method.getName().startsWith(ON_EDT_METHOD_NAME)) { + onEDT = false; + } + if (onEDT) { + invokeOnEDT(method); + } + else { + invoke(method); + } + + // Let all events on the EDT finish + waitForEDTToFinish(); + + nextProgress(method.getName()); + + // If done, stop. + synchronized(this) { + if (done) { + return; + } + } + } + + // No more methods, if we get and done isn't true, set it true + // so that the main thread wakes up. + synchronized(this) { + if (!done) { + done = true; + notifyAll(); + } + } + } + + private void waitForEDTToFinish() { + robot.waitForIdle(); + } + + private void invokeOnEDT(final Method method) { + try { + EventQueue.invokeAndWait(new Runnable() { + public void run() { + invoke(method); + } + }); + } catch (InvocationTargetException ite) { + fail(ite); + } catch (InterruptedException ie) { + fail(ie); + } + } + + private void invoke(Method method) { + System.out.println("invoking: " + method.getName()); + try { + if (Modifier.isPrivate(method.getModifiers())) { + method.setAccessible(true); + } + method.invoke(this); + } catch (Exception e) { + fail(e); + } + } + + // Determines the methods to execute. + private void calculateMethods() { + // Using a Set avoids duplicating methods returned by both + // getMethods() and getDeclaredMethods(). + HashSet<Method> allMethods = new HashSet<Method>(); + allMethods.addAll(Arrays.asList(getClass().getMethods())); + allMethods.addAll(Arrays.asList(getClass().getDeclaredMethods())); + + methods = new ArrayList<Method>(); + for (Method method : allMethods) { + Test test = method.getAnnotation(Test.class); + if (test != null) { + methods.add(method); + } + else if (method.getName().startsWith(ON_EDT_METHOD_NAME)) { + methods.add(method); + } + else if (method.getName().startsWith(IN_BACKGROUND_METHOD_NAME)) { + methods.add(method); + } + } + Comparator<Method> comparator = new Comparator<Method>() { + public int compare(Method m1, Method m2) { + int index1 = getIndex(m1); + int index2 = getIndex(m2); + return index1 - index2; + } + private int getIndex(Method m) { + String name = m.getName(); + String indexAsString; + Test test = m.getAnnotation(Test.class); + if (test != null) { + return test.value(); + } + if (name.startsWith(ON_EDT_METHOD_NAME)) { + indexAsString = name.substring( + ON_EDT_METHOD_NAME.length()); + } + else { + indexAsString = name.substring( + IN_BACKGROUND_METHOD_NAME.length()); + } + if (indexAsString.length() == 0) { + System.out.println( + "onEDT and onBackgroundThread must be " + + "followed by an integer specifying " + + "order."); + System.exit(0); + } + return Integer.parseInt(indexAsString); + } + }; + Collections.sort(methods, comparator); + } + + /** + * Invoke if the test should be considered to have failed. This will + * stop test execution. + */ + public void fail(String reason) { + fail(new RuntimeException(reason)); + } + + /** + * Invoke if the test should be considered to have failed. This will + * stop test execution. + */ + public void fail(Throwable error) { + synchronized(this) { + if (this.error == null) { + if (error instanceof InvocationTargetException) { + this.error = ((InvocationTargetException)error). + getCause(); + } + else { + this.error = error; + } + this.done = true; + notifyAll(); + } + } + } + + /** + * Invoke to prematurely stop test execution while there are remaining + * methods. You typically don't invoke this, instead if all methods have + * been executed and fail hasn't been invoked, the test is considered to + * have passed. + */ + public void succeeded() { + synchronized(this) { + this.done = true; + notifyAll(); + } + } + + /** + * Creates and returns the Robot that will be used. You generally don't + * need to override this. + */ + protected JRobot createRobot() { + JRobot robot = JRobot.getRobot(false); + return robot; + } + + + private class FocusListener implements PropertyChangeListener { + public void propertyChange(PropertyChangeEvent e) { + if (componentWaitingForFocus != null && + "focusOwner".equals(e.getPropertyName()) && + componentWaitingForFocus == e.getNewValue()) { + synchronized(SwingTestHelper.this) { + componentWaitingForFocus = null; + SwingTestHelper.this.notifyAll(); + } + } + } + } + + + private class EventCondition implements Runnable { + private Component component; + private int eventID; + private boolean received; + + EventCondition(Component component, int eventID) { + this.component = component; + this.eventID = eventID; + } + + public int getEventID() { + return eventID; + } + + public Component getComponent() { + return component; + } + + public void received() { + synchronized(SwingTestHelper.this) { + this.received = true; + SwingTestHelper.this.notifyAll(); + } + } + + public boolean isWaiting() { + return !received; + } + + public void run() { + synchronized(SwingTestHelper.this) { + while (!received) { + try { + SwingTestHelper.this.wait(); + } catch (InterruptedException ie) { + fail(ie); + } + } + } + } + } + + + private class FocusCondition implements Runnable { + public void run() { + synchronized(SwingTestHelper.this) { + while (componentWaitingForFocus != null) { + try { + SwingTestHelper.this.wait(); + } catch (InterruptedException ie) { + fail(ie); + } + } + } + } + } + + + private class PauseCondition implements Runnable { + private int time; + PauseCondition(int time) { + this.time = time; + } + public void run() { + try { + Thread.sleep(time); + } catch (InterruptedException ie) { + fail(ie); + } + } + } + + + private class EventListener implements AWTEventListener { + public void eventDispatched(AWTEvent ev) { + int eventID = ev.getID(); + synchronized (SwingTestHelper.this) { + for (Runnable condition : conditions) { + if (condition instanceof EventCondition) { + EventCondition ec = (EventCondition)condition; + if (ec.isWaiting()) { + if (eventID == ec.getEventID() && + (ec.getComponent() == null || + ev.getSource() == ec.getComponent())) { + ec.received(); + } + return; + } + } + else { + return; + } + } + } + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/javax/swing/regtesthelpers/Test.java Tue May 09 04:03:50 2017 +0100 @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2007, 2016, 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. + */ + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface Test { + int value(); + boolean onEDT() default true; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/javax/swing/text/FlowView/LayoutTest.java Tue May 09 04:03:50 2017 +0100 @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2007, 2016, 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 6452106 6606443 8161195 + @author Peter Zhelezniakov + @library ../../regtesthelpers + @build Test JRobot SwingTestHelper + @run main/timeout=300 LayoutTest +*/ + +import javax.swing.text.*; +import javax.swing.*; +import java.awt.event.*; +import java.awt.*; + +public class LayoutTest extends SwingTestHelper { + JTextPane text; + + public static void main(String[] args) throws Throwable { + new LayoutTest().run(args); + } + + protected Component createContentPane() { + return text = new JTextPane(); + } + + @Test(value=10, onEDT=true) + private void onEDT10() { + requestAndWaitForFocus(text); + } + + + @Test(value=100, onEDT=true) + private void prepare6452106() { + text.setText("This is easily generated on my\nmachine"); + Document doc = text.getDocument(); + + // wrap the long paragraph + Dimension d = text.getPreferredSize(); + Dimension size = new Dimension(d.width * 2 / 3, d.height * 5); + window.setSize(size); + + // place caret at the end of 2nd line + Element p1 = doc.getDefaultRootElement().getElement(0); + int pos = p1.getEndOffset(); + text.setCaretPosition(pos - 1); + } + + @Test(value=110, onEDT=false) + private void test6452106() { + robot.setDelay(300); + robot.hitKey(KeyEvent.VK_DELETE); + robot.hitKey(KeyEvent.VK_SPACE); + robot.hitKey(KeyEvent.VK_SPACE); + } + + + @Test(value=200, onEDT=true) + private void prepare6606443() { + text.setText("This is easily\ngenerated\non my machine"); + text.setSelectionStart(15); + text.setSelectionEnd(24); + } + + @Test(value=210, onEDT=false) + private void test6606443() { + robot.hitKey(KeyEvent.VK_ENTER); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/javax/xml/jaxp/transform/8167179/NamespacePrefixTest.java Tue May 09 04:03:50 2017 +0100 @@ -0,0 +1,188 @@ +/* + * Copyright (c) 2016, 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. + */ + +import java.io.StringReader; +import java.io.StringWriter; +import java.util.concurrent.CyclicBarrier; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; + +import javax.xml.transform.Source; +import javax.xml.transform.Templates; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.stream.StreamSource; + +import org.testng.annotations.Test; +import static org.testng.Assert.assertTrue; + +/* + * @test + * @bug 8167179 + * @run testng/othervm NamespacePrefixTest + * @summary This class tests the generation of namespace prefixes + */ +public class NamespacePrefixTest { + + @Test + public void testReuseTemplates() throws Exception { + final TransformerFactory tf = TransformerFactory.newInstance(); + final Source xslsrc = new StreamSource(new StringReader(XSL)); + final Templates tmpl = tf.newTemplates(xslsrc); + for (int i = 0; i < TRANSF_COUNT; i++) { + checkResult(doTransformation(tmpl.newTransformer())); + } + } + + @Test + public void testReuseTransformer() throws Exception { + final TransformerFactory tf = TransformerFactory.newInstance(); + final Source xslsrc = new StreamSource(new StringReader(XSL)); + final Transformer t = tf.newTransformer(xslsrc); + for (int i = 0; i < TRANSF_COUNT; i++) { + checkResult(doTransformation(t)); + } + } + + @Test + public void testConcurrentTransformations() throws Exception { + final TransformerFactory tf = TransformerFactory.newInstance(); + final Source xslsrc = new StreamSource(new StringReader(XSL)); + final Templates tmpl = tf.newTemplates(xslsrc); + concurrentTestPassed.set(true); + + // Execute multiple TestWorker tasks + for (int id = 0; id < THREADS_COUNT; id++) { + EXECUTOR.execute(new TransformerThread(tmpl.newTransformer(), id)); + } + // Initiate shutdown of previously submitted task + EXECUTOR.shutdown(); + // Wait for termination of submitted tasks + if (!EXECUTOR.awaitTermination(THREADS_COUNT, TimeUnit.SECONDS)) { + // If not all tasks terminates during the time out force them to shutdown + EXECUTOR.shutdownNow(); + } + // Check if all transformation threads generated the correct namespace prefix + assertTrue(concurrentTestPassed.get()); + } + + // Do one transformation with the provided transformer + private static String doTransformation(Transformer t) throws Exception { + StringWriter resWriter = new StringWriter(); + Source xmlSrc = new StreamSource(new StringReader(XML)); + t.transform(xmlSrc, new StreamResult(resWriter)); + return resWriter.toString(); + } + + // Check if the transformation result string contains the + // element with the exact namespace prefix generated. + private static void checkResult(String result) { + // Check prefix of 'Element2' element, it should always be the same + assertTrue(result.contains(EXPECTED_CONTENT)); + } + + // Check if the transformation result string contains the element with + // the exact namespace prefix generated by current thread. + // If the expected prefix is not found and there was no failures observed by + // other test threads then mark concurrent test as failed. + private static void checkThreadResult(String result, int id) { + boolean res = result.contains(EXPECTED_CONTENT); + System.out.printf("%d: transformation result: %s%n", id, res ? "Pass" : "Fail"); + if (!res) { + System.out.printf("%d result:%s%n", id, result); + } + concurrentTestPassed.compareAndSet(true, res); + } + + // TransformerThread task that does the transformation similar + // to testReuseTransformer test method + private class TransformerThread implements Runnable { + + private final Transformer transformer; + private final int id; + + TransformerThread(Transformer transformer, int id) { + this.transformer = transformer; + this.id = id; + } + + @Override + public void run() { + try { + System.out.printf("%d: waiting for barrier%n", id); + //Synchronize startup of all tasks + BARRIER.await(); + System.out.printf("%d: starting transformation%n", id); + checkThreadResult(doTransformation(transformer), id); + } catch (Exception ex) { + throw new RuntimeException("TransformerThread " + id + " failed", ex); + } + } + } + + // Number of subsequent transformations + private static final int TRANSF_COUNT = 10; + + // Number of transformer threads running concurently + private static final int THREADS_COUNT = 10; + + // Variable for storing the concurrent transformation test result. It is + // updated by transformer threads + private static final AtomicBoolean concurrentTestPassed = new AtomicBoolean(true); + + // Cyclic barrier for threads startup synchronization + private static final CyclicBarrier BARRIER = new CyclicBarrier(THREADS_COUNT); + + // Thread pool + private static final ExecutorService EXECUTOR = Executors.newCachedThreadPool(); + + // XSL that transforms XML and produces unique namespace prefixes for each element + private final static String XSL = "<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\">\n" + + " <xsl:template match=\"node()|@*\" priority=\"1\">\n" + + " <xsl:copy>\n" + + " <xsl:apply-templates select=\"node()|@*\"/>\n" + + " </xsl:copy>\n" + + " </xsl:template>\n" + + " <xsl:template match=\"*\" priority=\"2\">\n" + + " <xsl:element name=\"{name()}\" namespace=\"{namespace-uri()}\">\n" + + " <xsl:apply-templates select=\"node()|@*\"/>\n" + + " </xsl:element>\n" + + " </xsl:template>\n" + + "</xsl:stylesheet>"; + + // Simple XML content with root and two child elements + private final static String XML = "<TestRoot xmlns=\"test.xmlns\">\n" + + " <Element1 xmlns=\"test.xmlns\">\n" + + " </Element1>\n" + + " <Element2 xmlns=\"test.xmlns\">\n" + + " </Element2>\n" + + "</TestRoot>"; + + // With thread local namespace prefix index each transformation result should + // be the same and contain the same prefix for Element2 + private final static String EXPECTED_CONTENT = "</ns2:Element2>"; + +}
--- a/test/sun/misc/URLClassPath/ClassnameCharTest.java Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/misc/URLClassPath/ClassnameCharTest.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2012, 2016, 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 @@ -102,16 +102,60 @@ //--------------------- Infrastructure --------------------------- static volatile int passed = 0, failed = 0; - static boolean pass() {passed++; return true;} - static boolean fail() {failed++; server.stop(0); Thread.dumpStack(); return false;} - static boolean fail(String msg) {System.out.println(msg); return fail();} - static void unexpected(Throwable t) {failed++; server.stop(0); t.printStackTrace();} - static boolean check(boolean cond) {if (cond) pass(); else fail(); return cond;} + + static boolean pass() { + passed++; + return true; + } + + static boolean fail() { + failed++; + if (server != null) { + server.stop(0); + } + Thread.dumpStack(); + return false; + } + + static boolean fail(String msg) { + System.out.println(msg); + return fail(); + } + + static void unexpected(Throwable t) { + failed++; + if (server != null) { + server.stop(0); + } + t.printStackTrace(); + } + + static boolean check(boolean cond) { + if (cond) { + pass(); + } else { + fail(); + } + return cond; + } + static boolean equal(Object x, Object y) { - if (x == null ? y == null : x.equals(y)) return pass(); - else return fail(x + " not equal to " + y);} + if (x == null ? y == null : x.equals(y)) { + return pass(); + } else { + return fail(x + " not equal to " + y); + } + } + public static void main(String[] args) throws Throwable { - try {realMain(args);} catch (Throwable t) {unexpected(t);} + try { + realMain(args); + } catch (Throwable t) { + unexpected(t); + } System.out.println("\nPassed = " + passed + " failed = " + failed); - if (failed > 0) throw new AssertionError("Some tests failed");} + if (failed > 0) { + throw new AssertionError("Some tests failed"); + } + } }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/sun/net/ftp/FtpURLConnectionLeak.java Tue May 09 04:03:50 2017 +0100 @@ -0,0 +1,155 @@ +/* + * Copyright (c) 2016, 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 7167293 + * @summary FtpURLConnection doesn't close FTP connection when FileNotFoundException is thrown + * @library ../www/ftptest/ + * @build FtpServer FtpCommandHandler FtpAuthHandler FtpFileSystemHandler + * @run main FtpURLConnectionLeak + */ +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URL; + +public class FtpURLConnectionLeak { + + public static void main(String[] args) throws Exception { + FtpServer server = new FtpServer(0); + server.setFileSystemHandler(new CustomFileSystemHandler("/")); + server.setAuthHandler(new MyAuthHandler()); + int port = server.getLocalPort(); + server.start(); + URL url = new URL("ftp://localhost:" + port + "/filedoesNotExist.txt"); + for (int i = 0; i < 3; i++) { + try { + InputStream stream = url.openStream(); + } catch (FileNotFoundException expectedFirstTimeAround) { + // should always reach this point since the path does not exist + } catch (IOException expected) { + System.out.println("caught expected " + expected); + int times = 1; + do { + // give some time to close the connection... + System.out.println("sleeping... " + times); + Thread.sleep(times * 1000); + } while (server.activeClientsCount() > 0 && times++ < 5); + + if (server.activeClientsCount() > 0) { + server.killClients(); + throw new RuntimeException("URLConnection didn't close the" + + " FTP connection on FileNotFoundException"); + } + } finally { + server.terminate(); + } + } + } + + static class CustomFileSystemHandler implements FtpFileSystemHandler { + + private String currentDir; + + public CustomFileSystemHandler(String path) { + currentDir = path; + } + + @Override + public boolean cd(String path) { + currentDir = path; + return true; + } + + @Override + public boolean cdUp() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public String pwd() { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean fileExists(String name) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream getFile(String name) { + return null; //return null so that server will return 550 File not found. + } + + @Override + public long getFileSize(String name) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public InputStream listCurrentDir() { + return null; + } + + @Override + public OutputStream putFile(String name) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean removeFile(String name) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean mkdir(String name) { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public boolean rename(String from, String to) { + throw new UnsupportedOperationException("Not supported yet."); + } + + } + + static class MyAuthHandler implements FtpAuthHandler { + + @Override + public int authType() { + return 0; + } + + @Override + public boolean authenticate(String user, String password) { + return true; + } + + @Override + public boolean authenticate(String user, String password, String account) { + return true; + } + } +}
--- a/test/sun/net/www/protocol/http/HttpInputStream.java Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/net/www/protocol/http/HttpInputStream.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2016, 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 @@ -23,77 +23,95 @@ /* @test * @bug 4937598 - * @summary http://www.clipstream.com vedio does not play; read() problem + * @summary http://www.clipstream.com video does not play; read() problem */ -import java.util.*; -import java.io.*; -import java.net.*; -import java.text.*; - -public class HttpInputStream implements Runnable { - - ServerSocket serverSock; - - public void run() { - try { - Socket s = serverSock.accept(); - InputStream in = s.getInputStream(); - byte b[] = new byte[4096]; - - // assume we read the entire http request - // (bad assumption but okay for test case) - int nread = in.read(b); - - OutputStream o = s.getOutputStream(); - - o.write( "HTTP/1.1 200 OK".getBytes() ); - o.write( "Content-Length: 20".getBytes() ); - o.write( (byte)'\r' ); - o.write( (byte)'\n' ); - o.write( (byte)'\r' ); - o.write( (byte)'\n' ); - - for (int i = 0; i < 20; i++) { - o.write((byte)0xff); - } - - o.flush(); - o.close(); - - } catch (Exception e) { } - } - public HttpInputStream() throws Exception { +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.ServerSocket; +import java.net.Socket; +import java.net.URL; - serverSock = new ServerSocket(0); - int port = serverSock.getLocalPort(); +public class HttpInputStream { + + private static final int CONTENT_LENGTH = 20; - Thread thr = new Thread(this); - thr.start(); + static class Server implements AutoCloseable, Runnable { + + final ServerSocket serverSocket; + static final byte[] requestEnd = new byte[]{'\r', '\n', '\r', '\n'}; + static final int TIMEOUT = 10 * 1000; - Date date = new Date(new Date().getTime()-1440000); // this time yesterday - URL url; - HttpURLConnection con; + Server() throws IOException { + serverSocket = new ServerSocket(0); + } - url = new URL("http://localhost:" + String.valueOf(port) + - "/anything"); - con = (HttpURLConnection)url.openConnection(); + void readOneRequest(InputStream is) throws IOException { + int requestEndCount = 0, r; + while ((r = is.read()) != -1) { + if (r == requestEnd[requestEndCount]) { + requestEndCount++; + if (requestEndCount == 4) { + break; + } + } else { + requestEndCount = 0; + } + } + } - int ret = con.getResponseCode(); - byte[] b = new byte[20]; - InputStream is = con.getInputStream(); - int i = 0, count = 0; - while ((i = is.read()) != -1) { - System.out.println("i = "+i); - count++; - } - if (count != 20) { - throw new RuntimeException("HttpInputStream.read() failed with 0xff"); - } - } + @Override + public void run() { + try (Socket s = serverSocket.accept()) { + s.setSoTimeout(TIMEOUT); + readOneRequest(s.getInputStream()); + try (OutputStream os = + s.getOutputStream()) { + os.write("HTTP/1.1 200 OK".getBytes()); + os.write(("Content-Length: " + CONTENT_LENGTH).getBytes()); + os.write("\r\n\r\n".getBytes()); + for (int i = 0; i < CONTENT_LENGTH; i++) { + os.write(0xff); + } + os.flush(); + } + } catch (IOException e) { + e.printStackTrace(); + } + } + + @Override + public void close() throws IOException { + if (!serverSocket.isClosed()) { + serverSocket.close(); + } + } - public static void main(String args[]) throws Exception { - new HttpInputStream(); - } + public int getPort() { + return serverSocket.getLocalPort(); + } + } + + + private static int read(InputStream is) throws IOException { + int len = 0; + while (is.read() != -1) { + len++; + } + return len; + } + + public static void main(String args[]) throws IOException { + try (Server server = new Server()) { + (new Thread(server)).start(); + URL url = new URL("http://localhost:" + server.getPort() + "/anything"); + try (InputStream is = url.openConnection().getInputStream()) { + if (read(is) != CONTENT_LENGTH) { + throw new RuntimeException("HttpInputStream.read() failed with 0xff"); + } + } + } + } }
--- a/test/sun/security/krb5/auto/UnboundSSL.java Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/security/krb5/auto/UnboundSSL.java Tue May 09 04:03:50 2017 +0100 @@ -34,9 +34,9 @@ * @bug 8025123 * @summary Checks if an unbound server can handle connections * only for allowed service principals - * @run main/othervm/policy=unbound.ssl.policy UnboundSSL + * @run main/othervm/java.security.policy=unbound.ssl.policy UnboundSSL * unbound.ssl.jaas.conf server_star - * @run main/othervm/policy=unbound.ssl.policy UnboundSSL + * @run main/othervm/java.security.policy=unbound.ssl.policy UnboundSSL * unbound.ssl.jaas.conf server_multiple_principals */ public class UnboundSSL {
--- a/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/CloseSocket.java Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/CloseSocket.java Tue May 09 04:03:50 2017 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2016, 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 @@ -26,67 +26,96 @@ * @bug 4674913 * @summary Verify that EOFException are correctly handled during the handshake * @author Andreas Sterbenz + * @run main/othervm CloseSocket */ -import java.io.*; -import java.net.*; - -import javax.net.ssl.*; +import javax.net.SocketFactory; +import javax.net.ssl.SSLSocket; +import javax.net.ssl.SSLSocketFactory; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.ServerSocket; +import java.net.Socket; +import java.util.ArrayList; public class CloseSocket { + private static ArrayList<TestCase> testCases = new ArrayList<>(); + + static { + testCases.add(socket -> socket.startHandshake()); + testCases.add(socket -> { + InputStream in = socket.getInputStream(); + in.read(); + }); + testCases.add(socket -> { + OutputStream out = socket.getOutputStream(); + out.write(43); + }); + } + public static void main(String[] args) throws Exception { - final ServerSocket serverSocket = new ServerSocket(0); - int serverPort = serverSocket.getLocalPort(); - new Thread() { - public void run() { - try { - Socket s = serverSocket.accept(); - System.out.println("Server accepted connection"); - // wait a bit before closing the socket to give - // the client time to send its hello message - Thread.currentThread().sleep(100); - s.close(); - System.out.println("Server closed socket, done."); - } catch (Exception e) { - System.out.println("Server exception:"); - e.printStackTrace(); + try (Server server = new Server()) { + new Thread(server).start(); + + SocketFactory factory = SSLSocketFactory.getDefault(); + try (SSLSocket socket = (SSLSocket) factory.createSocket("localhost", + server.getPort())) { + socket.setSoTimeout(2000); + System.out.println("Client established TCP connection"); + boolean failed = false; + for (TestCase testCase : testCases) { + try { + testCase.test(socket); + System.out.println("ERROR: no exception"); + failed = true; + } catch (IOException e) { + System.out.println("Failed as expected: " + e); + } + } + if (failed) { + throw new Exception("One or more tests failed"); } } - }.start(); - SSLSocketFactory factory = (SSLSocketFactory)SSLSocketFactory.getDefault(); - SSLSocket socket = (SSLSocket)factory.createSocket("localhost", serverPort); - System.out.println("Client established TCP connection"); - boolean failed = false; - try { - System.out.println("Starting handshake..."); - socket.startHandshake(); - System.out.println("ERROR: no exception"); - failed = true; - } catch (IOException e) { - System.out.println("Failed as expected: " + e); - } - try { - System.out.println("Trying read..."); - InputStream in = socket.getInputStream(); - int b = in.read(); - System.out.println("ERROR: no exception, read: " + b); - failed = true; - } catch (IOException e) { - System.out.println("Failed as expected: " + e); - } - try { - System.out.println("Trying read..."); - OutputStream out = socket.getOutputStream(); - out.write(43); - System.out.println("ERROR: no exception"); - failed = true; - } catch (IOException e) { - System.out.println("Failed as expected: " + e); - } - if (failed) { - throw new Exception("One or more tests failed"); } } + static class Server implements AutoCloseable, Runnable { + + final ServerSocket serverSocket; + + Server() throws IOException { + serverSocket = new ServerSocket(0); + } + + public int getPort() { + return serverSocket.getLocalPort(); + } + + @Override + public void run() { + try (Socket s = serverSocket.accept()) { + System.out.println("Server accepted connection"); + // wait a bit before closing the socket to give + // the client time to send its hello message + Thread.currentThread().sleep(100); + s.close(); + System.out.println("Server closed socket, done."); + } catch (Exception e) { + throw new RuntimeException("Problem in test execution", e); + } + } + + @Override + public void close() throws Exception { + if (!serverSocket.isClosed()) { + serverSocket.close(); + } + } + } + + interface TestCase { + void test(SSLSocket socket) throws IOException; + } }
--- a/test/sun/security/tools/jarsigner/TimestampCheck.java Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/security/tools/jarsigner/TimestampCheck.java Tue May 09 04:03:50 2017 +0100 @@ -60,7 +60,7 @@ /* * @test - * @bug 6543842 6543440 6939248 8009636 8024302 8163304 8169911 8169688 + * @bug 6543842 6543440 6939248 8009636 8024302 8163304 8169911 8169688 8171121 * @summary checking response of timestamp * @modules java.base/sun.security.pkcs * java.base/sun.security.timestamp @@ -345,8 +345,8 @@ .shouldHaveExitValue(0); checkTimestamp("tsaalg.jar", defaultPolicyId, "SHA-1"); - sign("weak", "-digestalg", "MD2", - "-sigalg", "MD2withRSA", "-tsadigestalg", "MD2") + sign("weak", "-digestalg", "MD5", + "-sigalg", "MD5withRSA", "-tsadigestalg", "MD5") .shouldHaveExitValue(0); checkWeak("weak.jar");
--- a/test/sun/util/calendar/zi/tzdata/VERSION Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/util/calendar/zi/tzdata/VERSION Tue May 09 04:03:50 2017 +0100 @@ -21,4 +21,4 @@ # or visit www.oracle.com if you need additional information or have any # questions. # -tzdata2016i +tzdata2017a
--- a/test/sun/util/calendar/zi/tzdata/africa Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/util/calendar/zi/tzdata/africa Tue May 09 04:03:50 2017 +0100 @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-20): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -54,39 +54,33 @@ # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # +# European-style abbreviations are commonly used along the Mediterranean. +# For sub-Saharan Africa abbreviations were less standardized. # Previous editions of this database used WAT, CAT, SAT, and EAT -# for +0:00 through +3:00, respectively, -# but Mark R V Murray reports that -# 'SAST' is the official abbreviation for +2:00 in the country of South Africa, -# 'CAT' is commonly used for +2:00 in countries north of South Africa, and -# 'WAT' is probably the best name for +1:00, as the common phrase for +# for UT +00 through +03, respectively, +# but in 1997 Mark R V Murray reported that +# 'SAST' is the official abbreviation for +02 in the country of South Africa, +# 'CAT' is commonly used for +02 in countries north of South Africa, and +# 'WAT' is probably the best name for +01, as the common phrase for # the area that includes Nigeria is "West Africa". -# He has heard of "Western Sahara Time" for +0:00 but can find no reference. # -# To make things confusing, 'WAT' seems to have been used for -1:00 long ago; -# I'd guess that this was because people needed _some_ name for -1:00, -# and at the time, far west Africa was the only major land area in -1:00. -# This usage is now obsolete, as the last use of -1:00 on the African -# mainland seems to have been 1976 in Western Sahara. -# -# To summarize, the following abbreviations seem to have some currency: -# -1:00 WAT West Africa Time (no longer used) -# 0:00 GMT Greenwich Mean Time -# 2:00 CAT Central Africa Time -# 2:00 SAST South Africa Standard Time -# and Murray suggests the following abbreviation: -# 1:00 WAT West Africa Time -# I realize that this leads to 'WAT' being used for both -1:00 and 1:00 -# for times before 1976, but this is the best I can think of -# until we get more information. +# To summarize, the following abbreviations seemed to have some currency: +# +00 GMT Greenwich Mean Time +# +02 CAT Central Africa Time +# +02 SAST South Africa Standard Time +# and Murray suggested the following abbreviation: +# +01 WAT West Africa Time +# Murray's suggestion seems to have caught on in news reports and the like. +# I vaguely recall 'WAT' also being used for -01 in the past but +# cannot now come up with solid citations. # # I invented the following abbreviations; corrections are welcome! -# 2:00 WAST West Africa Summer Time -# 2:30 BEAT British East Africa Time (no longer used) -# 2:45 BEAUT British East Africa Unified Time (no longer used) -# 3:00 CAST Central Africa Summer Time (no longer used) -# 3:00 SAST South Africa Summer Time (no longer used) -# 3:00 EAT East Africa Time +# +02 WAST West Africa Summer Time +# +03 CAST Central Africa Summer Time (no longer used) +# +03 SAST South Africa Summer Time (no longer used) +# +03 EAT East Africa Time +# 'EAT' also seems to have caught on; the others are rare but are paired +# with better-attested non-DST abbreviations. # Algeria # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -142,19 +136,19 @@ # Cameroon # See Africa/Lagos. -# Cape Verde +# Cape Verde / Cabo Verde # -# Shanks gives 1907 for the transition to CVT. +# Shanks gives 1907 for the transition to +02. # Perhaps the 1911-05-26 Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Cape_Verde -1:34:04 - LMT 1907 # Praia - -2:00 - CVT 1942 Sep - -2:00 1:00 CVST 1945 Oct 15 - -2:00 - CVT 1975 Nov 25 2:00 - -1:00 - CVT + -2:00 - -02 1942 Sep + -2:00 1:00 -01 1945 Oct 15 + -2:00 - -02 1975 Nov 25 2:00 + -1:00 - -01 # Central African Republic # See Africa/Lagos. @@ -411,7 +405,7 @@ Rule Ghana 1920 1942 - Dec 31 0:00 0 GMT # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Accra -0:00:52 - LMT 1918 - 0:00 Ghana %s + 0:00 Ghana GMT/+0020 # Guinea # See Africa/Abidjan. @@ -420,20 +414,20 @@ # # Shanks gives 1911-05-26 for the transition to WAT, # evidently confusing the date of the Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # with the date that it took effect, namely 1912-01-01. # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Bissau -1:02:20 - LMT 1912 Jan 1 - -1:00 - WAT 1975 + -1:00 - -01 1975 0:00 - GMT # Kenya # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Nairobi 2:27:16 - LMT 1928 Jul 3:00 - EAT 1930 - 2:30 - BEAT 1940 - 2:45 - BEAUT 1960 + 2:30 - +0230 1940 + 2:45 - +0245 1960 3:00 - EAT Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia Link Africa/Nairobi Africa/Asmara # Eritrea @@ -460,7 +454,7 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Monrovia -0:43:08 - LMT 1882 -0:43:08 - MMT 1919 Mar # Monrovia Mean Time - -0:44:30 - LRT 1972 May # Liberia Time + -0:44:30 - -004430 1972 May 0:00 - GMT ############################################################################### @@ -619,7 +613,7 @@ Rule Mauritius 2009 only - Mar lastSun 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Mauritius 3:50:00 - LMT 1907 # Port Louis - 4:00 Mauritius MU%sT # Mauritius Time + 4:00 Mauritius +04/+05 # Agalega Is, Rodriguez # no information; probably like Indian/Mauritius @@ -938,14 +932,14 @@ # since most of it was then controlled by Morocco. Zone Africa/El_Aaiun -0:52:48 - LMT 1934 Jan # El Aaiún - -1:00 - WAT 1976 Apr 14 + -1:00 - -01 1976 Apr 14 0:00 Morocco WE%sT # Mozambique # # Shanks gives 1903-03-01 for the transition to CAT. # Perhaps the 1911-05-26 Portuguese decree -# http://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf +# https://dre.pt/pdf1sdip/1911/05/12500/23132313.pdf # merely made it official? # # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -972,16 +966,19 @@ # the country are close to 40 minutes earlier in sunrise than the rest # of the country. # -# From Paul Eggert (2007-03-31): -# Apparently the Caprivi Strip informally observes Botswana time, but -# we have no details. In the meantime people there can use Africa/Gaborone. +# From Paul Eggert (2017-02-22): +# Although the Zambezi Region (formerly known as Caprivi) informally +# observes Botswana time, we have no details about historical practice. +# In the meantime people there can use Africa/Gaborone. +# See: Immanuel S. The Namibian. 2017-02-23. +# http://www.namibian.com.na/51480/read/Time-change-divides-lawmakers # RULE NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Namibia 1994 max - Sep Sun>=1 2:00 1:00 S Rule Namibia 1995 max - Apr Sun>=1 2:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Windhoek 1:08:24 - LMT 1892 Feb 8 - 1:30 - SWAT 1903 Mar # SW Africa Time + 1:30 - +0130 1903 Mar 2:00 - SAST 1942 Sep 20 2:00 2:00 1:00 SAST 1943 Mar 21 2:00 2:00 - SAST 1990 Mar 21 # independence @@ -1008,7 +1005,7 @@ # Réunion # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis - 4:00 - RET # Réunion Time + 4:00 - +04 # # Crozet Islands also observes Réunion time; see the 'antarctica' file. # @@ -1043,7 +1040,7 @@ # Seychelles # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Mahe 3:41:48 - LMT 1906 Jun # Victoria - 4:00 - SCT # Seychelles Time + 4:00 - +04 # From Paul Eggert (2001-05-30): # Aldabra, Farquhar, and Desroches, originally dependencies of the # Seychelles, were transferred to the British Indian Ocean Territory
--- a/test/sun/util/calendar/zi/tzdata/antarctica Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/util/calendar/zi/tzdata/antarctica Tue May 09 04:03:50 2017 +0100 @@ -133,7 +133,8 @@ # O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02 # Prat, -6230-05941 # Villa Las Estrellas (a town), around the Frei base, since 1984-04-09 -# These locations have always used Santiago time; use TZ='America/Santiago'. +# These locations employ Region of Magallanes time; use +# TZ='America/Punta_Arenas'. # China - year-round bases # Great Wall, King George Island, -6213-05858, since 1985-02-20
--- a/test/sun/util/calendar/zi/tzdata/asia Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/util/calendar/zi/tzdata/asia Tue May 09 04:03:50 2017 +0100 @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2015-08-08): +# From Paul Eggert (2017-01-13): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -58,29 +58,24 @@ # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # -# I invented the abbreviations marked '*' in the following table; -# the rest are from earlier versions of this file, or from other sources. -# Corrections are welcome! +# The following alphabetic abbreviations appear in these tables: # std dst # LMT Local Mean Time # 2:00 EET EEST Eastern European Time # 2:00 IST IDT Israel -# 3:00 AST ADT Arabia* -# 3:30 IRST IRDT Iran* -# 4:00 GST Gulf* # 5:30 IST India -# 7:00 ICT Indochina, most times and locations* # 7:00 WIB west Indonesia (Waktu Indonesia Barat) # 8:00 WITA central Indonesia (Waktu Indonesia Tengah) # 8:00 CST China -# 8:00 IDT Indochina, 1943-45, 1947-55, 1960-75 (some locations)* -# 8:00 JWST Western Standard Time (Japan, 1896/1937)* -# 8:30 KST KDT Korea when at +0830* -# 9:00 JCST Central Standard Time (Japan, 1896/1937) +# 8:30 KST KDT Korea when at +0830 # 9:00 WIT east Indonesia (Waktu Indonesia Timur) # 9:00 JST JDT Japan # 9:00 KST KDT Korea when at +09 # 9:30 ACST Australian Central Standard Time +# Otherwise, these tables typically use numeric abbreviations like +03 +# and +0330 for integer hour and minute UTC offsets. Although earlier +# editions invented alphabetic time zone abbreviations for every +# offset, this did not reflect common practice. # # See the 'europe' file for Russia and Turkey in Asia. @@ -88,7 +83,7 @@ # Incorporates data for Singapore from Robert Elz' asia 1.1, as well as # additional information from Tom Yap, Sun Microsystems Intercontinental # Technical Support (including a page from the Official Airline Guide - -# Worldwide Edition). The names for time zones are guesses. +# Worldwide Edition). ############################################################################### @@ -109,8 +104,8 @@ # Afghanistan # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kabul 4:36:48 - LMT 1890 - 4:00 - AFT 1945 - 4:30 - AFT + 4:00 - +04 1945 + 4:30 - +0430 # Armenia # From Paul Eggert (2006-03-22): @@ -253,18 +248,17 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dhaka 6:01:40 - LMT 1890 5:53:20 - HMT 1941 Oct # Howrah Mean Time? - 6:30 - BURT 1942 May 15 # Burma Time - 5:30 - IST 1942 Sep - 6:30 - BURT 1951 Sep 30 - 6:00 - DACT 1971 Mar 26 # Dacca Time - 6:00 - BDT 2009 - 6:00 Dhaka BD%sT + 6:30 - +0630 1942 May 15 + 5:30 - +0530 1942 Sep + 6:30 - +0630 1951 Sep 30 + 6:00 - +06 2009 + 6:00 Dhaka +06/+07 # Bhutan # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Thimphu 5:58:36 - LMT 1947 Aug 15 # or Thimbu - 5:30 - IST 1987 Oct - 6:00 - BTT # Bhutan Time + 5:30 - +0530 1987 Oct + 6:00 - +06 # British Indian Ocean Territory # Whitman and the 1995 CIA time zone map say 5:00, but the @@ -274,14 +268,14 @@ # then contained the Chagos Archipelago). # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Chagos 4:49:40 - LMT 1907 - 5:00 - IOT 1996 # BIOT Time - 6:00 - IOT + 5:00 - +05 1996 + 6:00 - +06 # Brunei # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan - 7:30 - BNT 1933 - 8:00 - BNT + 7:30 - +0730 1933 + 8:00 - +08 # Burma / Myanmar @@ -290,9 +284,9 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Yangon 6:24:40 - LMT 1880 # or Rangoon 6:24:40 - RMT 1920 # Rangoon Mean Time? - 6:30 - BURT 1942 May # Burma Time - 9:00 - JST 1945 May 3 - 6:30 - MMT # Myanmar Time + 6:30 - +0630 1942 May + 9:00 - +09 1945 May 3 + 6:30 - +0630 # Cambodia # See Asia/Bangkok. @@ -355,7 +349,7 @@ # (could be true), for the moment I am assuming that those two # counties are mistakes in the astro.com data. -# From Paul Eggert (2014-06-30): +# From Paul Eggert (2017-01-05): # Alois Treindl kindly sent me translations of the following two sources: # # (1) @@ -413,28 +407,26 @@ # mainly observed in coastal areas), the five zones were: # # Changbai Time ("Long-white Time", Long-white = Heilongjiang area) UT +08:30 -# Asia/Harbin (currently a link to Asia/Shanghai) +# Now part of Asia/Shanghai; its pre-1970 times are not recorded here. # Heilongjiang (except Mohe county), Jilin # # Zhongyuan Time ("Central plain Time") UT +08 -# Asia/Shanghai +# Now part of Asia/Shanghai. # most of China -# This currently represents most other zones as well, -# as apparently these regions have been the same since 1970. # Milne gives 8:05:43.2 for Xujiahui Observatory time; round to nearest. # Guo says Shanghai switched to UT +08 "from the end of the 19th century". # -# Long-shu Time (probably due to Long and Shu being two names of the area) UT +07 -# Asia/Chongqing (currently a link to Asia/Shanghai) +# Long-shu Time (probably as Long and Shu were two names of the area) UT +07 +# Now part of Asia/Shanghai; its pre-1970 times are not recorded here. # Guangxi, Guizhou, Hainan, Ningxia, Sichuan, Shaanxi, and Yunnan; -# most of Gansu; west Inner Mongolia; west Qinghai; and the Guangdong +# most of Gansu; west Inner Mongolia; east Qinghai; and the Guangdong # counties Deqing, Enping, Kaiping, Luoding, Taishan, Xinxing, # Yangchun, Yangjiang, Yu'nan, and Yunfu. # # Xin-zang Time ("Xinjiang-Tibet Time") UT +06 -# Asia/Urumqi -# This currently represents Kunlun Time as well, -# as apparently the two regions have been the same since 1970. +# This region is now part of either Asia/Urumqi or Asia/Shanghai with +# current boundaries uncertain; times before 1970 for areas that +# disagree with Ürümqi or Shanghai are not recorded here. # The Gansu counties Aksay, Anxi, Dunhuang, Subei; west Qinghai; # the Guangdong counties Xuwen, Haikang, Suixi, Lianjiang, # Zhanjiang, Wuchuan, Huazhou, Gaozhou, Maoming, Dianbai, and Xinyi; @@ -445,7 +437,7 @@ # Fukang, Kuitun, Kumukuli, Miquan, Qitai, and Turfan. # # Kunlun Time UT +05:30 -# Asia/Kashgar (currently a link to Asia/Urumqi) +# This region is now in the same status as Xin-zang Time (see above). # West Tibet, including Pulan, Aheqi, Shufu, Shule; # West Xinjiang, including Aksu, Atushi, Yining, Hetian, Cele, Luopu, Nileke, # Zhaosu, Tekesi, Gongliu, Chabuchaer, Huocheng, Bole, Pishan, Suiding, @@ -546,7 +538,7 @@ # Xinjiang time, used by many in western China; represented by Ürümqi / Ürümchi # / Wulumuqi. (Please use Asia/Shanghai if you prefer Beijing time.) Zone Asia/Urumqi 5:50:20 - LMT 1928 - 6:00 - XJT + 6:00 - +06 # Hong Kong (Xianggang) @@ -765,30 +757,29 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Taipei or Taibei or T'ai-pei Zone Asia/Taipei 8:06:00 - LMT 1896 Jan 1 - 8:00 - JWST 1937 Oct 1 + 8:00 - CST 1937 Oct 1 9:00 - JST 1945 Sep 21 1:00 8:00 Taiwan C%sT # Macau (Macao, Aomen) # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Macau 1961 1962 - Mar Sun>=16 3:30 1:00 S -Rule Macau 1961 1964 - Nov Sun>=1 3:30 0 - -Rule Macau 1963 only - Mar Sun>=16 0:00 1:00 S -Rule Macau 1964 only - Mar Sun>=16 3:30 1:00 S -Rule Macau 1965 only - Mar Sun>=16 0:00 1:00 S -Rule Macau 1965 only - Oct 31 0:00 0 - -Rule Macau 1966 1971 - Apr Sun>=16 3:30 1:00 S -Rule Macau 1966 1971 - Oct Sun>=16 3:30 0 - -Rule Macau 1972 1974 - Apr Sun>=15 0:00 1:00 S -Rule Macau 1972 1973 - Oct Sun>=15 0:00 0 - -Rule Macau 1974 1977 - Oct Sun>=15 3:30 0 - -Rule Macau 1975 1977 - Apr Sun>=15 3:30 1:00 S -Rule Macau 1978 1980 - Apr Sun>=15 0:00 1:00 S -Rule Macau 1978 1980 - Oct Sun>=15 0:00 0 - +Rule Macau 1961 1962 - Mar Sun>=16 3:30 1:00 D +Rule Macau 1961 1964 - Nov Sun>=1 3:30 0 S +Rule Macau 1963 only - Mar Sun>=16 0:00 1:00 D +Rule Macau 1964 only - Mar Sun>=16 3:30 1:00 D +Rule Macau 1965 only - Mar Sun>=16 0:00 1:00 D +Rule Macau 1965 only - Oct 31 0:00 0 S +Rule Macau 1966 1971 - Apr Sun>=16 3:30 1:00 D +Rule Macau 1966 1971 - Oct Sun>=16 3:30 0 S +Rule Macau 1972 1974 - Apr Sun>=15 0:00 1:00 D +Rule Macau 1972 1973 - Oct Sun>=15 0:00 0 S +Rule Macau 1974 1977 - Oct Sun>=15 3:30 0 S +Rule Macau 1975 1977 - Apr Sun>=15 3:30 1:00 D +Rule Macau 1978 1980 - Apr Sun>=15 0:00 1:00 D +Rule Macau 1978 1980 - Oct Sun>=15 0:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Macau 7:34:20 - LMT 1912 Jan 1 - 8:00 Macau MO%sT 1999 Dec 20 # return to China - 8:00 PRC C%sT + 8:00 Macau C%sT ############################################################################### @@ -904,11 +895,10 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dili 8:22:20 - LMT 1912 Jan 1 - 8:00 - TLT 1942 Feb 21 23:00 # E Timor Time - 9:00 - JST 1945 Sep 23 - 9:00 - TLT 1976 May 3 - 8:00 - WITA 2000 Sep 17 0:00 - 9:00 - TLT + 8:00 - +08 1942 Feb 21 23:00 + 9:00 - +09 1976 May 3 + 8:00 - +08 2000 Sep 17 0:00 + 9:00 - +09 # India @@ -923,9 +913,9 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kolkata 5:53:28 - LMT 1880 # Kolkata 5:53:20 - HMT 1941 Oct # Howrah Mean Time? - 6:30 - BURT 1942 May 15 # Burma Time + 6:30 - +0630 1942 May 15 5:30 - IST 1942 Sep - 5:30 1:00 IST 1945 Oct 15 + 5:30 1:00 +0630 1945 Oct 15 5:30 - IST # The following are like Asia/Kolkata: # Andaman Is @@ -976,33 +966,33 @@ # Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13, # but this must be a typo. 7:07:12 - BMT 1923 Dec 31 23:47:12 # Batavia - 7:20 - JAVT 1932 Nov # Java Time - 7:30 - WIB 1942 Mar 23 - 9:00 - JST 1945 Sep 23 - 7:30 - WIB 1948 May - 8:00 - WIB 1950 May - 7:30 - WIB 1964 + 7:20 - +0720 1932 Nov + 7:30 - +0730 1942 Mar 23 + 9:00 - +09 1945 Sep 23 + 7:30 - +0730 1948 May + 8:00 - +08 1950 May + 7:30 - +0730 1964 7:00 - WIB # west and central Borneo Zone Asia/Pontianak 7:17:20 - LMT 1908 May 7:17:20 - PMT 1932 Nov # Pontianak MT - 7:30 - WIB 1942 Jan 29 - 9:00 - JST 1945 Sep 23 - 7:30 - WIB 1948 May - 8:00 - WIB 1950 May - 7:30 - WIB 1964 + 7:30 - +0730 1942 Jan 29 + 9:00 - +09 1945 Sep 23 + 7:30 - +0730 1948 May + 8:00 - +08 1950 May + 7:30 - +0730 1964 8:00 - WITA 1988 Jan 1 7:00 - WIB # Sulawesi, Lesser Sundas, east and south Borneo Zone Asia/Makassar 7:57:36 - LMT 1920 7:57:36 - MMT 1932 Nov # Macassar MT - 8:00 - WITA 1942 Feb 9 - 9:00 - JST 1945 Sep 23 + 8:00 - +08 1942 Feb 9 + 9:00 - +09 1945 Sep 23 8:00 - WITA # Maluku Islands, West Papua, Papua Zone Asia/Jayapura 9:22:48 - LMT 1932 Nov - 9:00 - WIT 1944 Sep 1 - 9:30 - ACST 1964 + 9:00 - +09 1944 Sep 1 + 9:30 - +0930 1964 9:00 - WIT # Iran @@ -1034,8 +1024,6 @@ # for at least the last 5 years. Before that, for a few years, the # date used was the first Thursday night of Farvardin and the last # Thursday night of Shahrivar, but I can't give exact dates.... -# I have also changed the abbreviations to what is considered correct -# here in Iran, IRST for regular time and IRDT for daylight saving time. # # From Roozbeh Pournader (2005-04-05): # The text of the Iranian law, in effect since 1925, clearly mentions @@ -1142,9 +1130,9 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Tehran 3:25:44 - LMT 1916 3:25:44 - TMT 1946 # Tehran Mean Time - 3:30 - IRST 1977 Nov - 4:00 Iran IR%sT 1979 - 3:30 Iran IR%sT + 3:30 - +0330 1977 Nov + 4:00 Iran +04/+05 1979 + 3:30 Iran +0330/+0430 # Iraq @@ -1187,8 +1175,8 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Baghdad 2:57:40 - LMT 1890 2:57:36 - BMT 1918 # Baghdad Mean Time? - 3:00 - AST 1982 May - 3:00 Iraq A%sT + 3:00 - +03 1982 May + 3:00 Iraq +03/+04 ############################################################################### @@ -1487,8 +1475,6 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u - 9:00 - JST 1896 Jan 1 - 9:00 - JCST 1937 Oct 1 9:00 Japan J%sT # Since 1938, all Japanese possessions have been like Asia/Tokyo. @@ -1606,12 +1592,12 @@ # was "blended" with the Central zone. Therefore, Kazakhstan now has # two time zones, and difference between them is one hour. The zone # closer to UTC is the former Western zone (probably still called the -# same), encompassing four provinces in the west: Aqtobe, Atyrau, -# Mangghystau, and West Kazakhstan. The other zone encompasses +# same), encompassing four provinces in the west: Aqtöbe, Atyraū, +# Mangghystaū, and West Kazakhstan. The other zone encompasses # everything else.... I guess that would make Kazakhstan time zones # de jure UTC+5 and UTC+6 respectively. -# From Stepan Golosunov (2016-03-27) ([*] means see later comments below): +# From Stepan Golosunov (2016-03-27): # Review of the linked documents from http://adilet.zan.kz/ # produced the following data for post-1991 Kazakhstan: # @@ -1657,7 +1643,7 @@ # # This implies that on 1991-03-31 Asia/Oral remained on +04/+05 while # the rest of Kazakhstan switched from +06/+07 to +05/06 or from +05/06 -# to +04/+05. It's unclear how Kzyl-Orda oblast moved into the fifth +# to +04/+05. It's unclear how Qyzylorda oblast moved into the fifth # time belt. (By switching from +04/+05 to +05/+06 on 1991-09-29?) ... # # 1. Act of the Cabinet of Ministers of the Republic of Kazakhstan @@ -1670,25 +1656,25 @@ # on the whole territory of Kazakhstan 1 hour forward on 1992-01-19 at # 2:00, specified DST rules. It acknowledged that Kazakhstan was # located in the fourth and the fifth time belts and specified the -# border between them to be located east of Kustanay and Aktyubinsk -# oblasts (notably including Turgai and Kzyl-Orda oblasts into the fifth +# border between them to be located east of Qostanay and Aktyubinsk +# oblasts (notably including Turgai and Qyzylorda oblasts into the fifth # time belt). # # This means switch on 1992-01-19 at 2:00 from +04/+05 to +05/+06 for -# Asia/Aqtau, Asia/Aqtobe, Asia/Oral, Atyrau and Kustanay oblasts; from -# +05/+06 to +06/+07 for Asia/Almaty and Asia/Qyzylorda (and Arkalyk) [*].... +# Asia/Aqtau, Asia/Aqtobe, Asia/Oral, Atyraū and Qostanay oblasts; from +# +05/+06 to +06/+07 for Asia/Almaty and Asia/Qyzylorda (and Arkalyk).... # # 2. Act of the Cabinet of Ministers of the Republic of Kazakhstan # from 1992-03-27 No. 284 # http://adilet.zan.kz/rus/docs/P920000284_ -# cancels extra hour ("decree time") for Uralsk and Kzyl-Orda oblasts +# cancels extra hour ("decree time") for Uralsk and Qyzylorda oblasts # since the last Sunday of March 1992, while keeping them in the fourth # and the fifth time belts respectively. # # 3. Order of the Prime Minister of the Republic of Kazakhstan # from 1994-09-23 No. 384 # http://adilet.zan.kz/rus/docs/R940000384_ -# cancels the extra hour ("decree time") on the territory of Mangystau +# cancels the extra hour ("decree time") on the territory of Mangghystaū # oblast since the last Sunday of September 1994 (saying that time on # the territory would correspond to the third time belt as a # result).... @@ -1702,14 +1688,11 @@ # 5. Act of the Government of the Republic of Kazakhstan # from 1999-03-26 No. 305 # http://adilet.zan.kz/rus/docs/P990000305_ -# cancels the extra hour ("decree time") for Atyrau oblast since the +# cancels the extra hour ("decree time") for Atyraū oblast since the # last Sunday of March 1999 while retaining the oblast in the fourth # time belt. # -# This means change from +05/+06 to +04/+05. -# -# There is no zone for Atyrau currently (listed under Asia/Aqtau in -# zone1970.tab).[*] +# This means change from +05/+06 to +04/+05.... # # 6. Act of the Government of the Republic of Kazakhstan # from 2000-11-23 No. 1749 @@ -1719,10 +1702,10 @@ # The only changes I noticed are in definition of the border between the # fourth and the fifth time belts. They account for changes in spelling # and administrative division (splitting of Turgai oblast in 1997 -# probably changed time in territories incorporated into Kostanay oblast -# (including Arkalyk) from +06/+07 to +05/+06) and move Kyzylorda oblast +# probably changed time in territories incorporated into Qostanay oblast +# (including Arkalyk) from +06/+07 to +05/+06) and move Qyzylorda oblast # from being in the fifth time belt and not using decree time into the -# fourth time belt (no change in practice).[*] +# fourth time belt (no change in practice). # # 7. Act of the Government of the Republic of Kazakhstan # from 2003-12-29 No. 1342 @@ -1732,7 +1715,7 @@ # 8. Act of the Government of the Republic of Kazakhstan # from 2004-07-20 No. 775 # http://adilet.zan.kz/rus/archive/docs/P040000775_/20.07.2004 -# modified the 2000-11-23 act to move Kostanay and Kyzylorda oblasts into +# modified the 2000-11-23 act to move Qostanay and Qyzylorda oblasts into # the fifth time belt and add Aktobe oblast to the list of regions not # using extra hour ("decree time"), leaving Kazakhstan with only 2 time # zones (+04/+05 and +06/+07). The changes were to be implemented @@ -1744,14 +1727,14 @@ # http://adilet.zan.kz/rus/docs/P040001059_ # modified the 2000-11-23 act to remove exceptions from the "decree time" # (leaving Kazakhstan in +05/+06 and +06/+07 zones), amended the -# 2004-07-20 act to implement changes for Atyrau, West Kazakhstan, -# Kostanay, Kyzylorda and Mangystau oblasts by not moving clocks -# during the 2014 transition to "winter" time. +# 2004-07-20 act to implement changes for Atyraū, West Kazakhstan, +# Qostanay, Qyzylorda and Mangghystaū oblasts by not moving clocks +# during the 2004 transition to "winter" time. # -# This means transition from +04/+05 to +05/+06 for Atyrau oblast (no +# This means transition from +04/+05 to +05/+06 for Atyraū oblast (no # zone currently), Asia/Oral, Asia/Aqtau and transition from +05/+06 to -# +06/+07 for Kostanay oblast (Kostanay and Arkalyk, no zones currently) -# and Asia/Qyzylorda on 2004-10-31 at 3:00....[*] +# +06/+07 for Qostanay oblast (Qostanay and Arkalyk, no zones currently) +# and Asia/Qyzylorda on 2004-10-31 at 3:00.... # # 10. Act of the Government of the Republic of Kazakhstan # from 2005-03-15 No. 231 @@ -1767,14 +1750,25 @@ # Kazakh 1992-01-13 act appears to provide the same rules and 1992-03-27 # act was to be enacted on the last Sunday of March 1992. -# From Paul Eggert (2016-04-15): -# The tables below should reflect Stepan Golosunov's remarks above, -# except for the items marked "[*]" which I haven't gotten to yet. -# It looks like we will need new zones Asia/Atyrau and Asia/Qostanay -# to handle changes from 1992 through 2004 that we did not previously -# know about. +# From Stepan Golosunov (2016-11-08): +# Turgai reorganization should affect only southern part of Qostanay +# oblast. Which should probably be separated into Asia/Arkalyk zone. +# (There were also 1970, 1988 and 1990 Turgai oblast reorganizations +# according to wikipedia.) +# +# [For Qostanay] http://www.ng.kz/gazeta/195/hranit/ +# suggests that clocks were to be moved 40 minutes backwards on +# 1920-01-01 to the fourth time belt. But I do not understand +# how that could happen.... +# +# [For Atyrau and Oral] 1919 decree +# (http://www.worldtimezone.com/dst_news/dst_news_russia-1919-02-08.html +# and in Byalokoz) lists Ural river (plus 10 versts on its left bank) in +# the third time belt (before 1930 this means +03). -# +# From Paul Eggert (2016-12-06): +# The tables below reflect Golosunov's remarks, with exceptions as noted. + # Zone NAME GMTOFF RULES FORMAT [UNTIL] # # Almaty (formerly Alma-Ata), representing most locations in Kazakhstan @@ -1787,6 +1781,8 @@ 6:00 RussiaAsia +06/+07 2004 Oct 31 2:00s 6:00 - +06 # Qyzylorda (aka Kyzylorda, Kizilorda, Kzyl-Orda, etc.) (KZ-KZY) +# This currently includes Qostanay (aka Kostanay, Kustanay) (KZ-KUS); +# see comments below. Zone Asia/Qyzylorda 4:21:52 - LMT 1924 May 2 4:00 - +04 1930 Jun 21 5:00 - +05 1981 Apr 1 @@ -1798,7 +1794,21 @@ 6:00 RussiaAsia +06/+07 1992 Mar 29 2:00s 5:00 RussiaAsia +05/+06 2004 Oct 31 2:00s 6:00 - +06 -# Aqtobe (aka Aktobe, formerly Aktyubinsk) (KZ-AKT) +# The following zone is like Asia/Qyzylorda except for being one +# hour earlier from 1991-09-29 to 1992-03-29. The 1991/2 rules for +# Qostanay are unclear partly because of the 1997 Turgai +# reorganization, so this zone is commented out for now. +#Zone Asia/Qostanay 4:14:20 - LMT 1924 May 2 +# 4:00 - +04 1930 Jun 21 +# 5:00 - +05 1981 Apr 1 +# 5:00 1:00 +06 1981 Oct 1 +# 6:00 - +06 1982 Apr 1 +# 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s +# 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s +# 5:00 RussiaAsia +05/+06 2004 Oct 31 2:00s +# 6:00 - +06 +# +# Aqtöbe (aka Aktobe, formerly Aktyubinsk) (KZ-AKT) Zone Asia/Aqtobe 3:48:40 - LMT 1924 May 2 4:00 - +04 1930 Jun 21 5:00 - +05 1981 Apr 1 @@ -1808,14 +1818,11 @@ 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s 5:00 RussiaAsia +05/+06 2004 Oct 31 2:00s 5:00 - +05 -# Qostanay (KZ-KUS) - -# Mangghystau (KZ-MAN) +# Mangghystaū (KZ-MAN) # Aqtau was not founded until 1963, but it represents an inhabited region, # so include time stamps before 1963. Zone Asia/Aqtau 3:21:04 - LMT 1924 May 2 4:00 - +04 1930 Jun 21 - 5:00 - +05 1963 5:00 - +05 1981 Oct 1 6:00 - +06 1982 Apr 1 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s @@ -1823,12 +1830,22 @@ 5:00 RussiaAsia +05/+06 1994 Sep 25 2:00s 4:00 RussiaAsia +04/+05 2004 Oct 31 2:00s 5:00 - +05 - +# Atyraū (KZ-ATY) is like Mangghystaū except it switched from +# +04/+05 to +05/+06 in spring 1999, not fall 1994. +Zone Asia/Atyrau 3:27:44 - LMT 1924 May 2 + 3:00 - +03 1930 Jun 21 + 5:00 - +05 1981 Oct 1 + 6:00 - +06 1982 Apr 1 + 5:00 RussiaAsia +05/+06 1991 Mar 31 2:00s + 4:00 RussiaAsia +04/+05 1992 Jan 19 2:00s + 5:00 RussiaAsia +05/+06 1999 Mar 28 2:00s + 4:00 RussiaAsia +04/+05 2004 Oct 31 2:00s + 5:00 - +05 # West Kazakhstan (KZ-ZAP) # From Paul Eggert (2016-03-18): # The 1989 transition is from USSR act No. 227 (1989-03-14). Zone Asia/Oral 3:25:24 - LMT 1924 May 2 # or Ural'sk - 4:00 - +04 1930 Jun 21 + 3:00 - +03 1930 Jun 21 5:00 - +05 1981 Apr 1 5:00 1:00 +06 1981 Oct 1 6:00 - +06 1982 Apr 1 @@ -1934,14 +1951,12 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Seoul 8:27:52 - LMT 1908 Apr 1 8:30 - KST 1912 Jan 1 - 9:00 - JCST 1937 Oct 1 9:00 - JST 1945 Sep 8 9:00 - KST 1954 Mar 21 8:30 ROK K%sT 1961 Aug 10 9:00 ROK K%sT 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 00:00 8:30 - KST @@ -1996,30 +2011,29 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kuala_Lumpur 6:46:46 - LMT 1901 Jan 1 6:55:25 - SMT 1905 Jun 1 # Singapore M.T. - 7:00 - MALT 1933 Jan 1 # Malaya Time - 7:00 0:20 MALST 1936 Jan 1 - 7:20 - MALT 1941 Sep 1 - 7:30 - MALT 1942 Feb 16 - 9:00 - JST 1945 Sep 12 - 7:30 - MALT 1982 Jan 1 - 8:00 - MYT # Malaysia Time + 7:00 - +07 1933 Jan 1 + 7:00 0:20 +0720 1936 Jan 1 + 7:20 - +0720 1941 Sep 1 + 7:30 - +0730 1942 Feb 16 + 9:00 - +09 1945 Sep 12 + 7:30 - +0730 1982 Jan 1 + 8:00 - +08 # Sabah & Sarawak # From Paul Eggert (2014-08-12): # The data entries here are mostly from Shanks & Pottenger, but the 1942, 1945 # and 1982 transition dates are from Mok Ly Yng. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kuching 7:21:20 - LMT 1926 Mar - 7:30 - BORT 1933 # Borneo Time - 8:00 NBorneo BOR%sT 1942 Feb 16 - 9:00 - JST 1945 Sep 12 - 8:00 - BORT 1982 Jan 1 - 8:00 - MYT + 7:30 - +0730 1933 + 8:00 NBorneo +08/+0820 1942 Feb 16 + 9:00 - +09 1945 Sep 12 + 8:00 - +08 # Maldives # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Maldives 4:54:00 - LMT 1880 # Male 4:54:00 - MMT 1960 # Male Mean Time - 5:00 - MVT # Maldives Time + 5:00 - +05 # Mongolia @@ -2146,37 +2160,41 @@ # correction of 02:00 (in the previous edition) not being done correctly # in the latest edition; so ignore it for now. +# From Ganbold Tsagaankhuu (2017-02-09): +# Mongolian Government meeting has concluded today to cancel daylight +# saving time adoption in Mongolia. Source: http://zasag.mn/news/view/16192 + Rule Mongol 1985 1998 - Mar lastSun 0:00 1:00 S Rule Mongol 1984 1998 - Sep lastSun 0:00 0 - # IATA SSIM (1999-09) says Mongolia no longer observes DST. Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S Rule Mongol 2001 2006 - Sep lastSat 2:00 0 - Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S -Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S -Rule Mongol 2015 max - Sep lastSat 0:00 0 - +Rule Mongol 2015 2016 - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 2016 - Sep lastSat 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta Zone Asia/Hovd 6:06:36 - LMT 1905 Aug - 6:00 - HOVT 1978 # Hovd Time - 7:00 Mongol HOV%sT + 6:00 - +06 1978 + 7:00 Mongol +07/+08 # Ulaanbaatar, a.k.a. Ulan Bataar, Ulan Bator, Urga Zone Asia/Ulaanbaatar 7:07:32 - LMT 1905 Aug - 7:00 - ULAT 1978 # Ulaanbaatar Time - 8:00 Mongol ULA%sT + 7:00 - +07 1978 + 8:00 Mongol +08/+09 # Choibalsan, a.k.a. Bajan Tümen, Bajan Tumen, Chojbalsan, # Choybalsan, Sanbejse, Tchoibalsan Zone Asia/Choibalsan 7:38:00 - LMT 1905 Aug - 7:00 - ULAT 1978 - 8:00 - ULAT 1983 Apr - 9:00 Mongol CHO%sT 2008 Mar 31 # Choibalsan Time - 8:00 Mongol CHO%sT + 7:00 - +07 1978 + 8:00 - +08 1983 Apr + 9:00 Mongol +09/+10 2008 Mar 31 + 8:00 Mongol +08/+09 # Nepal # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Kathmandu 5:41:16 - LMT 1920 - 5:30 - IST 1986 - 5:45 - NPT # Nepal Time + 5:30 - +0530 1986 + 5:45 - +0545 # Oman # See Asia/Dubai. @@ -2325,10 +2343,10 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Karachi 4:28:12 - LMT 1907 - 5:30 - IST 1942 Sep - 5:30 1:00 IST 1945 Oct 15 - 5:30 - IST 1951 Sep 30 - 5:00 - KART 1971 Mar 26 # Karachi Time + 5:30 - +0530 1942 Sep + 5:30 1:00 +0630 1945 Oct 15 + 5:30 - +0530 1951 Sep 30 + 5:00 - +05 1971 Mar 26 5:00 Pakistan PK%sT # Pakistan Time # Palestine @@ -2639,7 +2657,7 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct - 2:00 Zion EET 1948 May 15 + 2:00 Zion EET/EEST 1948 May 15 2:00 EgyptAsia EE%sT 1967 Jun 5 2:00 Zion I%sT 1996 2:00 Jordan EE%sT 1999 @@ -2652,7 +2670,7 @@ 2:00 Palestine EE%sT Zone Asia/Hebron 2:20:23 - LMT 1900 Oct - 2:00 Zion EET 1948 May 15 + 2:00 Zion EET/EEST 1948 May 15 2:00 EgyptAsia EE%sT 1967 Jun 5 2:00 Zion I%sT 1996 2:00 Jordan EE%sT 1999 @@ -2693,15 +2711,15 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Manila -15:56:00 - LMT 1844 Dec 31 8:04:00 - LMT 1899 May 11 - 8:00 Phil PH%sT 1942 May - 9:00 - JST 1944 Nov - 8:00 Phil PH%sT + 8:00 Phil +08/+09 1942 May + 9:00 - +09 1944 Nov + 8:00 Phil +08/+09 # Qatar # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha - 4:00 - GST 1972 Jun - 3:00 - AST + 4:00 - +04 1972 Jun + 3:00 - +03 Link Asia/Qatar Asia/Bahrain # Saudi Arabia @@ -2728,7 +2746,7 @@ # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14 - 3:00 - AST + 3:00 - +03 Link Asia/Riyadh Asia/Aden # Yemen Link Asia/Riyadh Asia/Kuwait @@ -2738,14 +2756,13 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Singapore 6:55:25 - LMT 1901 Jan 1 6:55:25 - SMT 1905 Jun 1 # Singapore M.T. - 7:00 - MALT 1933 Jan 1 # Malaya Time - 7:00 0:20 MALST 1936 Jan 1 - 7:20 - MALT 1941 Sep 1 - 7:30 - MALT 1942 Feb 16 - 9:00 - JST 1945 Sep 12 - 7:30 - MALT 1965 Aug 9 # independence - 7:30 - SGT 1982 Jan 1 # Singapore Time - 8:00 - SGT + 7:00 - +07 1933 Jan 1 + 7:00 0:20 +0720 1936 Jan 1 + 7:20 - +0720 1941 Sep 1 + 7:30 - +0730 1942 Feb 16 + 9:00 - +09 1945 Sep 12 + 7:30 - +0730 1982 Jan 1 + 8:00 - +08 # Spratly Is # no information @@ -2804,8 +2821,8 @@ Zone Asia/Colombo 5:19:24 - LMT 1880 5:19:32 - MMT 1906 # Moratuwa Mean Time 5:30 - +0530 1942 Jan 5 - 5:30 0:30 +0530/+06 1942 Sep - 5:30 1:00 +0530/+0630 1945 Oct 16 2:00 + 5:30 0:30 +06 1942 Sep + 5:30 1:00 +0630 1945 Oct 16 2:00 5:30 - +0530 1996 May 25 0:00 6:30 - +0630 1996 Oct 26 0:30 6:00 - +06 2006 Apr 15 0:30 @@ -2987,7 +3004,7 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Bangkok 6:42:04 - LMT 1880 6:42:04 - BMT 1920 Apr # Bangkok Mean Time - 7:00 - ICT + 7:00 - +07 Link Asia/Bangkok Asia/Phnom_Penh # Cambodia Link Asia/Bangkok Asia/Vientiane # Laos @@ -3003,7 +3020,7 @@ # United Arab Emirates # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dubai 3:41:12 - LMT 1920 - 4:00 - GST + 4:00 - +04 Link Asia/Dubai Asia/Muscat # Oman # Uzbekistan @@ -3076,15 +3093,15 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jul 1 - 7:06:30 - PLMT 1911 May 1 - 7:00 - ICT 1942 Dec 31 23:00 - 8:00 - IDT 1945 Mar 14 23:00 - 9:00 - JST 1945 Sep 2 - 7:00 - ICT 1947 Apr 1 - 8:00 - IDT 1955 Jul 1 - 7:00 - ICT 1959 Dec 31 23:00 - 8:00 - IDT 1975 Jun 13 - 7:00 - ICT + 7:06:30 - PLMT 1911 May 1 # Phù Liễn MT + 7:00 - +07 1942 Dec 31 23:00 + 8:00 - +08 1945 Mar 14 23:00 + 9:00 - +09 1945 Sep 2 + 7:00 - +07 1947 Apr 1 + 8:00 - +08 1955 Jul 1 + 7:00 - +07 1959 Dec 31 23:00 + 8:00 - +08 1975 Jun 13 + 7:00 - +07 # Yemen # See Asia/Riyadh.
--- a/test/sun/util/calendar/zi/tzdata/australasia Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/util/calendar/zi/tzdata/australasia Tue May 09 04:03:50 2017 +0100 @@ -67,8 +67,8 @@ 8:00 Aus AW%sT 1943 Jul 8:00 AW AW%sT Zone Australia/Eucla 8:35:28 - LMT 1895 Dec - 8:45 Aus ACW%sT 1943 Jul - 8:45 AW ACW%sT + 8:45 Aus +0845/+0945 1943 Jul + 8:45 AW +0845/+0945 # Queensland # @@ -235,7 +235,8 @@ Rule LH 2008 max - Oct Sun>=1 2:00 0:30 D Zone Australia/Lord_Howe 10:36:20 - LMT 1895 Feb 10:00 - AEST 1981 Mar - 10:30 LH LH%sT + 10:30 LH +1030/+1130 1985 Jul + 10:30 LH +1030/+11 # Australian miscellany # @@ -273,19 +274,19 @@ 0 - -00 1948 Mar 25 10:00 Aus AE%sT 1967 10:00 AT AE%sT 2010 Apr 4 3:00 - 11:00 - MIST # Macquarie I Standard Time + 11:00 - +11 # Christmas # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Christmas 7:02:52 - LMT 1895 Feb - 7:00 - CXT # Christmas Island Time + 7:00 - +07 # Cocos (Keeling) Is # These islands were ruled by the Ross family from about 1830 to 1978. # We don't know when standard time was introduced; for now, we guess 1900. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Indian/Cocos 6:27:40 - LMT 1900 - 6:30 - CCT # Cocos Islands Time + 6:30 - +0630 # Fiji @@ -398,16 +399,16 @@ 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 + 12:00 Fiji +12/+13 # French Polynesia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Gambier -8:59:48 - LMT 1912 Oct # Rikitea - -9:00 - GAMT # Gambier Time + -9:00 - -09 Zone Pacific/Marquesas -9:18:00 - LMT 1912 Oct - -9:30 - MART # Marquesas Time + -9:30 - -0930 Zone Pacific/Tahiti -9:58:16 - LMT 1912 Oct # Papeete - -10:00 - TAHT # Tahiti Time + -10:00 - -10 # Clipperton (near North America) is administered from French Polynesia; # it is uninhabited. @@ -422,15 +423,15 @@ # Kiribati # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Tarawa 11:32:04 - LMT 1901 # Bairiki - 12:00 - GILT # Gilbert Is Time + 12:00 - +12 Zone Pacific/Enderbury -11:24:20 - LMT 1901 - -12:00 - PHOT 1979 Oct # Phoenix Is Time - -11:00 - PHOT 1995 - 13:00 - PHOT + -12:00 - -12 1979 Oct + -11:00 - -11 1995 + 13:00 - +13 Zone Pacific/Kiritimati -10:29:20 - LMT 1901 - -10:40 - LINT 1979 Oct # Line Is Time - -10:00 - LINT 1995 - 14:00 - LINT + -10:40 - -1040 1979 Oct + -10:00 - -10 1995 + 14:00 - +14 # N Mariana Is # See Pacific/Guam. @@ -438,31 +439,31 @@ # Marshall Is # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Majuro 11:24:48 - LMT 1901 - 11:00 - MHT 1969 Oct # Marshall Islands Time - 12:00 - MHT + 11:00 - +11 1969 Oct + 12:00 - +12 Zone Pacific/Kwajalein 11:09:20 - LMT 1901 - 11:00 - MHT 1969 Oct - -12:00 - KWAT 1993 Aug 20 # Kwajalein Time - 12:00 - MHT + 11:00 - +11 1969 Oct + -12:00 - -12 1993 Aug 20 + 12:00 - +12 # Micronesia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Chuuk 10:07:08 - LMT 1901 - 10:00 - CHUT # Chuuk Time + 10:00 - +10 Zone Pacific/Pohnpei 10:32:52 - LMT 1901 # Kolonia - 11:00 - PONT # Pohnpei Time + 11:00 - +11 Zone Pacific/Kosrae 10:51:56 - LMT 1901 - 11:00 - KOST 1969 Oct # Kosrae Time - 12:00 - KOST 1999 - 11:00 - KOST + 11:00 - +11 1969 Oct + 12:00 - +12 1999 + 11:00 - +11 # Nauru # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Nauru 11:07:40 - LMT 1921 Jan 15 # Uaobe - 11:30 - NRT 1942 Mar 15 # Nauru Time - 9:00 - JST 1944 Aug 15 - 11:30 - NRT 1979 May - 12:00 - NRT + 11:30 - +1130 1942 Mar 15 + 9:00 - +09 1944 Aug 15 + 11:30 - +1130 1979 May + 12:00 - +12 # New Caledonia # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -473,7 +474,7 @@ Rule NC 1997 only - Mar 2 2:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Noumea 11:05:48 - LMT 1912 Jan 13 # Nouméa - 11:00 NC NC%sT + 11:00 NC +11/+12 ############################################################################### @@ -514,8 +515,8 @@ 11:30 NZ NZ%sT 1946 Jan 1 12:00 NZ NZ%sT Zone Pacific/Chatham 12:13:48 - LMT 1868 Nov 2 - 12:15 - CHAST 1946 Jan 1 - 12:45 Chatham CHA%sT + 12:15 - +1215 1946 Jan 1 + 12:45 Chatham +1245/+1345 Link Pacific/Auckland Antarctica/McMurdo @@ -537,8 +538,8 @@ Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 HS # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua - -10:30 - CKT 1978 Nov 12 # Cook Is Time - -10:00 Cook CK%sT + -10:30 - -1030 1978 Nov 12 + -10:00 Cook -10/-0930 ############################################################################### @@ -546,29 +547,29 @@ # Niue # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Niue -11:19:40 - LMT 1901 # Alofi - -11:20 - NUT 1951 # Niue Time - -11:30 - NUT 1978 Oct 1 - -11:00 - NUT + -11:20 - -1120 1951 + -11:30 - -1130 1978 Oct 1 + -11:00 - -11 # Norfolk # 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 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 + 11:12 - +1112 1951 + 11:30 - +1130 1974 Oct 27 02:00 + 11:30 1:00 +1230 1975 Mar 2 02:00 + 11:30 - +1130 2015 Oct 4 02:00 + 11:00 - +11 # Palau (Belau) # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Palau 8:57:56 - LMT 1901 # Koror - 9:00 - PWT # Palau Time + 9:00 - +09 # Papua New Guinea # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Port_Moresby 9:48:40 - LMT 1880 9:48:32 - PMMT 1895 # Port Moresby Mean Time - 10:00 - PGT # Papua New Guinea Time + 10:00 - +10 # # From Paul Eggert (2014-10-13): # Base the Bougainville entry on the Arawa-Kieta region, which appears to have @@ -583,28 +584,26 @@ # and seem to have controlled it until their 1945-08-21 surrender. # # The Autonomous Region of Bougainville switched from UT +10 to +11 -# on 2014-12-28 at 02:00. They call +11 "Bougainville Standard Time"; -# abbreviate this as BST. See: +# on 2014-12-28 at 02:00. They call +11 "Bougainville Standard Time". +# See: # http://www.bougainville24.com/bougainville-issues/bougainville-gets-own-timezone/ # Zone Pacific/Bougainville 10:22:16 - LMT 1880 9:48:32 - PMMT 1895 - 10:00 - PGT 1942 Jul - 9:00 - JST 1945 Aug 21 - 10:00 - PGT 2014 Dec 28 2:00 - 11:00 - BST + 10:00 - +10 1942 Jul + 9:00 - +09 1945 Aug 21 + 10:00 - +10 2014 Dec 28 2:00 + 11:00 - +11 # Pitcairn # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Pitcairn -8:40:20 - LMT 1901 # Adamstown - -8:30 - PNT 1998 Apr 27 0:00 - -8:00 - PST # Pitcairn Standard Time + -8:30 - -0830 1998 Apr 27 0:00 + -8:00 - -08 # American Samoa Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5 -11:22:48 - LMT 1911 - -11:00 - NST 1967 Apr # N=Nome - -11:00 - BST 1983 Nov 30 # B=Bering -11:00 - SST # S=Samoa Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands @@ -685,17 +684,17 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Apia 12:33:04 - LMT 1879 Jul 5 -11:26:56 - LMT 1911 - -11:30 - WSST 1950 - -11:00 WS S%sT 2011 Dec 29 24:00 # S=Samoa - 13:00 WS WS%sT + -11:30 - -1130 1950 + -11:00 WS -11/-10 2011 Dec 29 24:00 + 13:00 WS +13/+14 # Solomon Is # excludes Bougainville, for which see Papua New Guinea # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Guadalcanal 10:39:48 - LMT 1912 Oct # Honiara - 11:00 - SBT # Solomon Is Time + 11:00 - +11 -# Tokelau Is +# Tokelau # # From Gwillim Law (2011-12-29) # A correspondent informed me that Tokelau, like Samoa, will be skipping @@ -716,8 +715,8 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Fakaofo -11:24:56 - LMT 1901 - -11:00 - TKT 2011 Dec 30 # Tokelau Time - 13:00 - TKT + -11:00 - -11 2011 Dec 30 + 13:00 - +13 # Tonga # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -736,7 +735,7 @@ # Tuvalu # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Funafuti 11:56:52 - LMT 1901 - 12:00 - TVT # Tuvalu Time + 12:00 - +12 # US minor outlying islands @@ -760,10 +759,11 @@ # Johnston # -# From Paul Eggert (2014-03-11): +# From Paul Eggert (2017-02-10): # Sometimes Johnston kept Hawaii time, and sometimes it was an hour behind. # Details are uncertain. We have no data for Johnston after 1970, so -# treat it like Hawaii for now. +# treat it like Hawaii for now. Since Johnston is now uninhabited, +# its link to Pacific/Honolulu is in the 'backward' file. # # In his memoirs of June 6th to October 4, 1945 # <http://www.315bw.org/Herb_Bach.htm> (2005), Herbert C. Bach writes, @@ -783,8 +783,6 @@ # See the table on page 4 where he lists GMT and local times for the tests; a # footnote for the JI tests reads that local time is "JI time = Hawaii Time # Minus One Hour". -# -# See 'northamerica' for Pacific/Johnston. # Kingman # uninhabited @@ -798,7 +796,7 @@ # Wake # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Wake 11:06:28 - LMT 1901 - 12:00 - WAKT # Wake Time + 12:00 - +12 # Vanuatu @@ -811,12 +809,12 @@ Rule Vanuatu 1992 only - Oct Sun>=23 0:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila - 11:00 Vanuatu VU%sT # Vanuatu Time + 11:00 Vanuatu +11/+12 # Wallis and Futuna # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Pacific/Wallis 12:15:20 - LMT 1901 - 12:00 - WFT # Wallis & Futuna Time + 12:00 - +12 ############################################################################### @@ -827,15 +825,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-10): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -852,28 +850,19 @@ # A reliable and entertaining source about time zones is # Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). # -# I invented the abbreviations marked '*' in the following table; -# the rest are from earlier versions of this file, or from other sources. +# The following abbreviations are from other sources. # Corrections are welcome! # std dst # LMT Local Mean Time # 8:00 AWST AWDT Western Australia -# 8:45 ACWST ACWDT Central Western Australia* -# 9:00 JST Japan # 9:30 ACST ACDT Central Australia # 10:00 AEST AEDT Eastern Australia +# 10:00 GST Guam through 2000 # 10:00 ChST Chamorro -# 10:30 LHST LHDT Lord Howe* -# 11:00 BST Bougainville* # 11:30 NZMT NZST New Zealand through 1945 # 12:00 NZST NZDT New Zealand 1946-present -# 12:15 CHAST Chatham through 1945* -# 12:45 CHAST CHADT Chatham 1946-present* -# 13:00 WSST WSDT (western) Samoa 2011-present* -# -11:30 WSST Western Samoa through 1950* # -11:00 SST Samoa # -10:00 HST Hawaii -# - 8:00 PST Pitcairn* # # See the 'northamerica' file for Hawaii. # See the 'southamerica' file for Easter I and the Galápagos Is.
--- a/test/sun/util/calendar/zi/tzdata/backward Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/util/calendar/zi/tzdata/backward Tue May 09 04:03:50 2017 +0100 @@ -119,6 +119,7 @@ Link Pacific/Chatham NZ-CHAT Link America/Denver Navajo Link Asia/Shanghai PRC +Link Pacific/Honolulu Pacific/Johnston Link Pacific/Pohnpei Pacific/Ponape Link Pacific/Pago_Pago Pacific/Samoa Link Pacific/Chuuk Pacific/Truk
--- a/test/sun/util/calendar/zi/tzdata/europe Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/util/calendar/zi/tzdata/europe Tue May 09 04:03:50 2017 +0100 @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-10): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -79,26 +79,23 @@ # History of Summer Time # <http://pcdsh01.on.br/HISTHV.htm> # (1998-09-21, in Portuguese) - # # I invented the abbreviations marked '*' in the following table; -# the rest are from earlier versions of this file, or from other sources. -# Corrections are welcome! -# std dst 2dst -# LMT Local Mean Time -# -4:00 AST ADT Atlantic -# -3:00 WGT WGST Western Greenland* -# -1:00 EGT EGST Eastern Greenland* -# 0:00 GMT BST BDST Greenwich, British Summer -# 0:00 GMT IST Greenwich, Irish Summer -# 0:00 WET WEST WEMT Western Europe -# 0:19:32.13 AMT NST Amsterdam, Netherlands Summer (1835-1937)* -# 0:20 NET NEST Netherlands (1937-1940)* -# 1:00 BST British Standard (1968-1971) -# 1:00 CET CEST CEMT Central Europe -# 1:00:14 SET Swedish (1879-1899)* -# 2:00 EET EEST Eastern Europe -# 3:00 MSK MSD Moscow +# the rest are variants of the "xMT" pattern for a city's mean time, +# or are from other sources. Corrections are welcome! +# std dst 2dst +# LMT Local Mean Time +# -4:00 AST ADT Atlantic +# 0:00 GMT BST BDST Greenwich, British Summer +# 0:00 GMT IST Greenwich, Irish Summer +# 0:00 WET WEST WEMT Western Europe +# 0:19:32.13 AMT* NST* Amsterdam, Netherlands Summer (1835-1937) +# 1:00 BST British Standard (1968-1971) +# 1:00 CET CEST CEMT Central Europe +# 1:00:14 SET Swedish (1879-1899) +# 1:36:34 RMT* LST* Riga, Latvian Summer (1880-1926)* +# 2:00 EET EEST Eastern Europe +# 3:00 MSK MSD MDST* Moscow # From Peter Ilieve (1994-12-04), # The original six [EU members]: Belgium, France, (West) Germany, Italy, @@ -498,7 +495,7 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2 - -0:25:21 - DMT 1916 May 21 2:00 + -0:25:21 - DMT 1916 May 21 2:00 # Dublin MT -0:25:21 1:00 IST 1916 Oct 1 2:00s 0:00 GB-Eire %s 1921 Dec 6 # independence 0:00 GB-Eire GMT/IST 1940 Feb 25 2:00 @@ -924,7 +921,7 @@ # Cyprus # Please see the 'asia' file for Asia/Nicosia. -# Czech Republic +# Czech Republic / Czechia # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Czech 1945 only - Apr 8 2:00s 1:00 S Rule Czech 1945 only - Nov 18 2:00s 0 - @@ -1087,16 +1084,16 @@ # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Danmarkshavn -1:14:40 - LMT 1916 Jul 28 - -3:00 - WGT 1980 Apr 6 2:00 - -3:00 EU WG%sT 1996 + -3:00 - -03 1980 Apr 6 2:00 + -3:00 EU -03/-02 1996 0:00 - GMT Zone America/Scoresbysund -1:27:52 - LMT 1916 Jul 28 # Ittoqqortoormiit - -2:00 - CGT 1980 Apr 6 2:00 - -2:00 C-Eur CG%sT 1981 Mar 29 - -1:00 EU EG%sT + -2:00 - -02 1980 Apr 6 2:00 + -2:00 C-Eur -02/-01 1981 Mar 29 + -1:00 EU -01/+00 Zone America/Godthab -3:26:56 - LMT 1916 Jul 28 # Nuuk - -3:00 - WGT 1980 Apr 6 2:00 - -3:00 EU WG%sT + -3:00 - -03 1980 Apr 6 2:00 + -3:00 EU -03/-02 Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik air base -4:00 Thule A%sT @@ -1511,7 +1508,7 @@ Rule Iceland 1967 only - Oct 29 1:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Reykjavik -1:28 - LMT 1908 - -1:00 Iceland IS%sT 1968 Apr 7 1:00s + -1:00 Iceland -01/+00 1968 Apr 7 1:00s 0:00 - GMT # Italy @@ -1975,7 +1972,7 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Amsterdam 0:19:32 - LMT 1835 0:19:32 Neth %s 1937 Jul 1 - 0:20 Neth NE%sT 1940 May 16 0:00 # Dutch Time + 0:20 Neth +0020/+0120 1940 May 16 0:00 1:00 C-Eur CE%sT 1945 Apr 2 2:00 1:00 Neth CE%sT 1977 1:00 EU CE%sT @@ -2192,16 +2189,34 @@ 0:00 W-Eur WE%sT 1992 Sep 27 1:00s 1:00 EU CE%sT 1996 Mar 31 1:00u 0:00 EU WE%sT +# This Zone can be simplified once we assume zic %z. Zone Atlantic/Azores -1:42:40 - LMT 1884 # Ponta Delgada -1:54:32 - HMT 1912 Jan 1 # Horta Mean Time - -2:00 Port AZO%sT 1966 Apr 3 2:00 # Azores Time - -1:00 Port AZO%sT 1983 Sep 25 1:00s - -1:00 W-Eur AZO%sT 1992 Sep 27 1:00s + -2:00 Port -02/-01 1942 Apr 25 22:00s + -2:00 Port +00 1942 Aug 15 22:00s + -2:00 Port -02/-01 1943 Apr 17 22:00s + -2:00 Port +00 1943 Aug 28 22:00s + -2:00 Port -02/-01 1944 Apr 22 22:00s + -2:00 Port +00 1944 Aug 26 22:00s + -2:00 Port -02/-01 1945 Apr 21 22:00s + -2:00 Port +00 1945 Aug 25 22:00s + -2:00 Port -02/-01 1966 Apr 3 2:00 + -1:00 Port -01/+00 1983 Sep 25 1:00s + -1:00 W-Eur -01/+00 1992 Sep 27 1:00s 0:00 EU WE%sT 1993 Mar 28 1:00u - -1:00 EU AZO%sT + -1:00 EU -01/+00 +# This Zone can be simplified once we assume zic %z. Zone Atlantic/Madeira -1:07:36 - LMT 1884 # Funchal -1:07:36 - FMT 1912 Jan 1 # Funchal Mean Time - -1:00 Port MAD%sT 1966 Apr 3 2:00 # Madeira Time + -1:00 Port -01/+00 1942 Apr 25 22:00s + -1:00 Port +01 1942 Aug 15 22:00s + -1:00 Port -01/+00 1943 Apr 17 22:00s + -1:00 Port +01 1943 Aug 28 22:00s + -1:00 Port -01/+00 1944 Apr 22 22:00s + -1:00 Port +01 1944 Aug 26 22:00s + -1:00 Port -01/+00 1945 Apr 21 22:00s + -1:00 Port +01 1945 Aug 25 22:00s + -1:00 Port -01/+00 1966 Apr 3 2:00 0:00 Port WE%sT 1983 Sep 25 1:00s 0:00 EU WE%sT @@ -2559,10 +2574,8 @@ 3:00 - MSK -# From Tim Parenti (2014-07-03): -# Europe/Simferopol covers... -# ** **** Crimea, Republic of -# ** **** Sevastopol +# From Paul Eggert (2016-12-06): +# Europe/Simferopol covers Crimea. Zone Europe/Simferopol 2:16:24 - LMT 1880 2:16 - SMT 1924 May 2 # Simferopol Mean T @@ -2624,10 +2637,9 @@ 3:00 - +03 2016 Mar 27 2:00s 4:00 - +04 -# From Paul Eggert (2016-03-18): +# From Paul Eggert (2016-11-11): # Europe/Volgograd covers: # 34 RU-VGG Volgograd Oblast -# 64 RU-SAR Saratov Oblast # The 1988 transition is from USSR act No. 5 (1988-01-04). Zone Europe/Volgograd 2:57:40 - LMT 1920 Jan 3 @@ -2640,6 +2652,27 @@ 4:00 - +04 2014 Oct 26 2:00s 3:00 - +03 +# From Paul Eggert (2016-11-11): +# Europe/Saratov covers: +# 64 RU-SAR Saratov Oblast + +# From Yuri Konotopov (2016-11-11): +# Dec 4, 2016 02:00 UTC+3.... Saratov Region's local time will be ... UTC+4. +# From Stepan Golosunov (2016-11-11): +# ... Byalokoz listed Saratov on 03:04:18. +# From Stepan Golosunov (2016-11-22): +# http://publication.pravo.gov.ru/Document/View/0001201611220031 + +Zone Europe/Saratov 3:04:18 - LMT 1919 Jul 1 0:00u + 3:00 - +03 1930 Jun 21 + 4:00 Russia +04/+05 1988 Mar 27 2:00s + 3:00 Russia +03/+04 1991 Mar 31 2:00s + 4:00 - +04 1992 Mar 29 2:00s + 3:00 Russia +03/+04 2011 Mar 27 2:00s + 4:00 - +04 2014 Oct 26 2:00s + 3:00 - +03 2016 Dec 4 2:00s + 4:00 - +04 + # From Paul Eggert (2016-03-18): # Europe/Kirov covers: # 43 RU-KIR Kirov Oblast @@ -3235,46 +3268,77 @@ # See Europe/Belgrade. # Spain +# +# From Paul Eggert (2016-12-14): +# +# The source for Europe/Madrid before 2013 is: +# Planesas P. La hora oficial en España y sus cambios. +# Anuario del Observatorio Astronómico de Madrid (2013, in Spanish). +# http://astronomia.ign.es/rknowsys-theme/images/webAstro/paginas/documentos/Anuario/lahoraoficialenespana.pdf +# As this source says that historical time in the Canaries is obscure, +# and it does not discuss Ceuta, stick with Shanks for now for that data. +# +# In the 1918 and 1919 fallback transitions in Spain, the clock for +# the hour-longer day officially kept going after midnight, so that +# the repeated instances of that day's 00:00 hour were 24 hours apart, +# with a fallback transition from the second occurrence of 00:59... to +# the next day's 00:00. Our data format cannot represent this +# directly, and instead repeats the first hour of the next day, with a +# fallback transition from the next day's 00:59... to 00:00. + +# From Michael Deckers (2016-12-15): +# The Royal Decree of 1900-06-26 quoted by Planesas, online at +# https://www.boe.es/datos/pdfs/BOE//1900/209/A00383-00384.pdf +# says in its article 5 (my translation): +# These dispositions will enter into force beginning with the +# instant at which, according to the time indicated in article 1, +# the 1st day of January of 1901 will begin. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -# For 1917-1919 Whitman gives Apr Sat>=1 - Oct Sat>=1; -# go with Shanks & Pottenger. -Rule Spain 1917 only - May 5 23:00s 1:00 S -Rule Spain 1917 1919 - Oct 6 23:00s 0 - -Rule Spain 1918 only - Apr 15 23:00s 1:00 S -Rule Spain 1919 only - Apr 5 23:00s 1:00 S -# Whitman gives 1921 Feb 28 - Oct 14; go with Shanks & Pottenger. -Rule Spain 1924 only - Apr 16 23:00s 1:00 S -# Whitman gives 1924 Oct 14; go with Shanks & Pottenger. -Rule Spain 1924 only - Oct 4 23:00s 0 - -Rule Spain 1926 only - Apr 17 23:00s 1:00 S -# Whitman says no DST in 1929; go with Shanks & Pottenger. -Rule Spain 1926 1929 - Oct Sat>=1 23:00s 0 - -Rule Spain 1927 only - Apr 9 23:00s 1:00 S -Rule Spain 1928 only - Apr 14 23:00s 1:00 S -Rule Spain 1929 only - Apr 20 23:00s 1:00 S -# Whitman gives 1937 Jun 16, 1938 Apr 16, 1940 Apr 13; -# go with Shanks & Pottenger. -Rule Spain 1937 only - May 22 23:00s 1:00 S -Rule Spain 1937 1939 - Oct Sat>=1 23:00s 0 - -Rule Spain 1938 only - Mar 22 23:00s 1:00 S -Rule Spain 1939 only - Apr 15 23:00s 1:00 S -Rule Spain 1940 only - Mar 16 23:00s 1:00 S -# Whitman says no DST 1942-1945; go with Shanks & Pottenger. -Rule Spain 1942 only - May 2 22:00s 2:00 M # Midsummer -Rule Spain 1942 only - Sep 1 22:00s 1:00 S -Rule Spain 1943 1946 - Apr Sat>=13 22:00s 2:00 M -Rule Spain 1943 only - Oct 3 22:00s 1:00 S -Rule Spain 1944 only - Oct 10 22:00s 1:00 S -Rule Spain 1945 only - Sep 30 1:00 1:00 S -Rule Spain 1946 only - Sep 30 0:00 0 - +Rule Spain 1918 only - Apr 15 23:00 1:00 S +Rule Spain 1918 1919 - Oct 6 24:00s 0 - +Rule Spain 1919 only - Apr 6 23:00 1:00 S +Rule Spain 1924 only - Apr 16 23:00 1:00 S +Rule Spain 1924 only - Oct 4 24:00s 0 - +Rule Spain 1926 only - Apr 17 23:00 1:00 S +Rule Spain 1926 1929 - Oct Sat>=1 24:00s 0 - +Rule Spain 1927 only - Apr 9 23:00 1:00 S +Rule Spain 1928 only - Apr 15 0:00 1:00 S +Rule Spain 1929 only - Apr 20 23:00 1:00 S +# Republican Spain during the civil war; it controlled Madrid until 1939-03-28. +Rule Spain 1937 only - Jun 16 23:00 1:00 S +Rule Spain 1937 only - Oct 2 24:00s 0 - +Rule Spain 1938 only - Apr 2 23:00 1:00 S +Rule Spain 1938 only - Apr 30 23:00 2:00 M +Rule Spain 1938 only - Oct 2 24:00 1:00 S +# The following rules are for unified Spain again. +# +# Planesas does not say what happened in Madrid between its fall on +# 1939-03-28 and the Nationalist spring-forward transition on +# 1939-04-15. For lack of better info, assume Madrid's clocks did not +# change during that period. +# +# The first rule is commented out, as it is redundant for Republican Spain. +#Rule Spain 1939 only - Apr 15 23:00 1:00 S +Rule Spain 1939 only - Oct 7 24:00s 0 - +Rule Spain 1942 only - May 2 23:00 1:00 S +Rule Spain 1942 only - Sep 1 1:00 0 - +Rule Spain 1943 1946 - Apr Sat>=13 23:00 1:00 S +Rule Spain 1943 1944 - Oct Sun>=1 1:00 0 - +Rule Spain 1945 1946 - Sep lastSun 1:00 0 - Rule Spain 1949 only - Apr 30 23:00 1:00 S -Rule Spain 1949 only - Sep 30 1:00 0 - -Rule Spain 1974 1975 - Apr Sat>=13 23:00 1:00 S +Rule Spain 1949 only - Oct 2 1:00 0 - +Rule Spain 1974 1975 - Apr Sat>=12 23:00 1:00 S Rule Spain 1974 1975 - Oct Sun>=1 1:00 0 - Rule Spain 1976 only - Mar 27 23:00 1:00 S Rule Spain 1976 1977 - Sep lastSun 1:00 0 - -Rule Spain 1977 1978 - Apr 2 23:00 1:00 S -Rule Spain 1978 only - Oct 1 1:00 0 - +Rule Spain 1977 only - Apr 2 23:00 1:00 S +Rule Spain 1978 only - Apr 2 2:00s 1:00 S +Rule Spain 1978 only - Oct 1 2:00s 0 - +# Nationalist Spain during the civil war +#Rule NatSpain 1937 only - May 22 23:00 1:00 S +#Rule NatSpain 1937 1938 - Oct Sat>=1 24:00s 0 - +#Rule NatSpain 1938 only - Mar 26 23:00 1:00 S # The following rules are copied from Morocco from 1967 through 1978. Rule SpainAfrica 1967 only - Jun 3 12:00 1:00 S Rule SpainAfrica 1967 only - Oct 1 0:00 0 - @@ -3286,11 +3350,11 @@ Rule SpainAfrica 1978 only - Jun 1 0:00 1:00 S Rule SpainAfrica 1978 only - Aug 4 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Europe/Madrid -0:14:44 - LMT 1901 Jan 1 0:00s - 0:00 Spain WE%sT 1946 Sep 30 +Zone Europe/Madrid -0:14:44 - LMT 1900 Dec 31 23:45:16 + 0:00 Spain WE%sT 1940 Mar 16 23:00 1:00 Spain CE%sT 1979 1:00 EU CE%sT -Zone Africa/Ceuta -0:21:16 - LMT 1901 +Zone Africa/Ceuta -0:21:16 - LMT 1900 Dec 31 23:38:44 0:00 - WET 1918 May 6 23:00 0:00 1:00 WEST 1918 Oct 7 23:00 0:00 - WET 1924 @@ -3299,7 +3363,7 @@ 1:00 - CET 1986 1:00 EU CE%sT Zone Atlantic/Canary -1:01:36 - LMT 1922 Mar # Las Palmas de Gran C. - -1:00 - CANT 1946 Sep 30 1:00 # Canaries T + -1:00 - -01 1946 Sep 30 1:00 0:00 - WET 1980 Apr 6 0:00s 0:00 1:00 WEST 1980 Sep 28 1:00u 0:00 EU WE%sT @@ -3712,7 +3776,7 @@ # spelling, except omit the apostrophe as it is not allowed in # portable Posix file names. Zone Europe/Zaporozhye 2:20:40 - LMT 1880 - 2:20 - CUT 1924 May 2 # Central Ukraine T + 2:20 - +0220 1924 May 2 2:00 - EET 1930 Jun 21 3:00 - MSK 1941 Aug 25 1:00 C-Eur CE%sT 1943 Oct 25
--- a/test/sun/util/calendar/zi/tzdata/iso3166.tab Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/util/calendar/zi/tzdata/iso3166.tab Tue May 09 04:03:50 2017 +0100 @@ -98,7 +98,7 @@ CR Costa Rica CU Cuba CV Cape Verde -CW Curacao +CW Curaçao CX Christmas Island CY Cyprus CZ Czech Republic
--- a/test/sun/util/calendar/zi/tzdata/leapseconds Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/util/calendar/zi/tzdata/leapseconds Tue May 09 04:03:50 2017 +0100 @@ -81,5 +81,5 @@ Leap 2015 Jun 30 23:59:60 + S Leap 2016 Dec 31 23:59:60 + S -# Updated through IERS Bulletin C52 -# File expires on: 28 June 2017 +# Updated through IERS Bulletin C53 +# File expires on: 28 December 2017
--- a/test/sun/util/calendar/zi/tzdata/northamerica Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/util/calendar/zi/tzdata/northamerica Tue May 09 04:03:50 2017 +0100 @@ -201,22 +201,6 @@ Zone MST7MDT -7:00 US M%sT Zone PST8PDT -8:00 US P%sT -# From Bob Devine (1988-01-28): -# ...Alaska (and Hawaii) had the timezone names changed in 1967. -# old new -# Pacific Standard Time(PST) -same- -# Yukon Standard Time(YST) -same- -# Central Alaska S.T. (CAT) Alaska-Hawaii St[an]dard Time (AHST) -# Nome Standard Time (NT) Bering Standard Time (BST) -# -# ...Alaska's timezone lines were redrawn in 1983 to give only 2 tz. -# The YST zone now covers nearly all of the state, AHST just part -# of the Aleutian islands. No DST. - -# From Paul Eggert (1995-12-19): -# The tables below use 'NST', not 'NT', for Nome Standard Time. -# I invented 'CAWT' for Central Alaska War Time. - # From U. S. Naval Observatory (1989-01-19): # USA EASTERN 5 H BEHIND UTC NEW YORK, WASHINGTON # USA EASTERN 4 H BEHIND UTC APR 3 - OCT 30 @@ -273,6 +257,21 @@ # Samoa standard time # The law doesn't give abbreviations. # +# From Paul Eggert (2016-12-19): +# Here are URLs for the 1918 and 1966 legislation: +# http://uscode.house.gov/statviewer.htm?volume=40&page=451 +# http://uscode.house.gov/statviewer.htm?volume=80&page=108 +# Although the 1918 names were officially "United States Standard +# Eastern Time" and similarly for "Central", "Mountain", "Pacific", +# and "Alaska", in practice "Standard" was placed just before "Time", +# as codified in 1966. In practice, Alaska time was abbreviated "AST" +# before 1968. Summarizing the 1967 name changes: +# 1918 names 1967 names +# -08 Standard Pacific Time (PST) Pacific standard time (PST) +# -09 (unofficial) Yukon (YST) Yukon standard time (YST) +# -10 Standard Alaska Time (AST) Alaska-Hawaii standard time (AHST) +# -11 (unofficial) Nome (NST) Bering standard time (BST) +# # From Paul Eggert (2000-01-08), following a heads-up from Rives McDow: # Public law 106-564 (2000-12-23) introduced ... "Chamorro Standard Time" # for time in Guam and the Northern Marianas. See the file "australasia". @@ -328,6 +327,15 @@ # Roberts, city administrator in Phenix City. as saying "We are in the Central # time zone, but we do go by the Eastern time zone because so many people work # in Columbus." +# +# From Paul Eggert (2017-02-22): +# Four cities are involved. The two not mentioned above are Smiths Station +# and Valley. Barbara Brooks, Valley's assistant treasurer, heard it started +# because West Point Pepperell textile mills were in Alabama while the +# corporate office was in Georgia, and residents voted to keep Eastern +# time even after the mills closed. See: Kazek K. Did you know which +# Alabama towns are in a different time zone? al.com 2017-02-06. +# http://www.al.com/living/index.ssf/2017/02/do_you_know_which_alabama_town.html # From Paul Eggert (2014-09-06): # Monthly Notices of the Royal Astronomical Society 44, 4 (1884-02-08), 208 @@ -505,7 +513,7 @@ -8:00 US P%sT # Alaska -# AK%sT is the modern abbreviation for -9:00 per USNO. +# AK%sT is the modern abbreviation for -09 per USNO. # # From Paul Eggert (2001-05-30): # Howse writes that Alaska switched from the Julian to the Gregorian calendar, @@ -611,10 +619,8 @@ -9:00 US AK%sT Zone America/Anchorage 14:00:24 - LMT 1867 Oct 18 -9:59:36 - LMT 1900 Aug 20 12:00 - -10:00 - CAT 1942 - -10:00 US CAT/CAWT 1945 Aug 14 23:00u - -10:00 US CAT/CAPT 1946 # Peace - -10:00 - CAT 1967 Apr + -10:00 - AST 1942 + -10:00 US A%sT 1967 Apr -10:00 - AHST 1969 -10:00 US AH%sT 1983 Oct 30 2:00 -9:00 US Y%sT 1983 Nov 30 @@ -703,7 +709,6 @@ -10:30 1:00 HDT 1945 Sep 30 2:00 -10:30 - HST 1947 Jun 8 2:00 -10:00 - HST -Link Pacific/Honolulu Pacific/Johnston # Now we turn to US areas that have diverged from the consensus since 1970. @@ -1091,15 +1096,15 @@ ################################################################################ -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2017-02-10): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -2757,15 +2762,15 @@ # Belize # Whitman entirely disagrees with Shanks; go with Shanks & Pottenger. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Belize 1918 1942 - Oct Sun>=2 0:00 0:30 HD -Rule Belize 1919 1943 - Feb Sun>=9 0:00 0 S -Rule Belize 1973 only - Dec 5 0:00 1:00 D -Rule Belize 1974 only - Feb 9 0:00 0 S -Rule Belize 1982 only - Dec 18 0:00 1:00 D -Rule Belize 1983 only - Feb 12 0:00 0 S +Rule Belize 1918 1942 - Oct Sun>=2 0:00 0:30 -0530 +Rule Belize 1919 1943 - Feb Sun>=9 0:00 0 CST +Rule Belize 1973 only - Dec 5 0:00 1:00 CDT +Rule Belize 1974 only - Feb 9 0:00 0 CST +Rule Belize 1982 only - Dec 18 0:00 1:00 CDT +Rule Belize 1983 only - Feb 12 0:00 0 CST # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Belize -5:52:48 - LMT 1912 Apr - -6:00 Belize C%sT + -6:00 Belize %s # Bermuda @@ -3037,16 +3042,16 @@ # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule DR 1966 only - Oct 30 0:00 1:00 D -Rule DR 1967 only - Feb 28 0:00 0 S -Rule DR 1969 1973 - Oct lastSun 0:00 0:30 HD -Rule DR 1970 only - Feb 21 0:00 0 S -Rule DR 1971 only - Jan 20 0:00 0 S -Rule DR 1972 1974 - Jan 21 0:00 0 S +Rule DR 1966 only - Oct 30 0:00 1:00 EDT +Rule DR 1967 only - Feb 28 0:00 0 EST +Rule DR 1969 1973 - Oct lastSun 0:00 0:30 -0430 +Rule DR 1970 only - Feb 21 0:00 0 EST +Rule DR 1971 only - Jan 20 0:00 0 EST +Rule DR 1972 1974 - Jan 21 0:00 0 EST # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Santo_Domingo -4:39:36 - LMT 1890 -4:40 - SDMT 1933 Apr 1 12:00 # S. Dom. MT - -5:00 DR E%sT 1974 Oct 27 + -5:00 DR %s 1974 Oct 27 -4:00 - AST 2000 Oct 29 2:00 -5:00 US E%sT 2000 Dec 3 1:00 -4:00 - AST @@ -3336,8 +3341,8 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Miquelon -3:44:40 - LMT 1911 May 15 # St Pierre -4:00 - AST 1980 May - -3:00 - PMST 1987 # Pierre & Miquelon Time - -3:00 Canada PM%sT + -3:00 - -03 1987 + -3:00 Canada -03/-02 # St Vincent and the Grenadines # See America/Port_of_Spain.
--- a/test/sun/util/calendar/zi/tzdata/southamerica Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/util/calendar/zi/tzdata/southamerica Tue May 09 04:03:50 2017 +0100 @@ -29,15 +29,15 @@ # tz@iana.org for general use in the future). For more, please see # the file CONTRIBUTING in the tz distribution. -# From Paul Eggert (2014-10-31): +# From Paul Eggert (2016-12-05): # # Unless otherwise specified, the source for data through 1990 is: # Thomas G. Shanks and Rique Pottenger, The International Atlas (6th edition), # San Diego: ACS Publications, Inc. (2003). # Unfortunately this book contains many errors and cites no sources. # -# Gwillim Law writes that a good source -# for recent time zone data is the International Air Transport +# Many years ago Gwillim Law wrote that a good source +# for time zone data was the International Air Transport # Association's Standard Schedules Information Manual (IATA SSIM), # published semiannually. Law sent in several helpful summaries # of the IATA's data after 1990. Except where otherwise noted, @@ -47,32 +47,10 @@ # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. # http://www.jstor.org/stable/1774359 # -# Earlier editions of these tables used the North American style (e.g. ARST and -# ARDT for Argentine Standard and Daylight Time), but the following quote -# suggests that it's better to use European style (e.g. ART and ARST). -# I suggest the use of _Summer time_ instead of the more cumbersome -# _daylight-saving time_. _Summer time_ seems to be in general use -# in Europe and South America. -# -- E O Cutler, _New York Times_ (1937-02-14), quoted in -# H L Mencken, _The American Language: Supplement I_ (1960), p 466 -# -# Earlier editions of these tables also used the North American style -# for time zones in Brazil, but this was incorrect, as Brazilians say -# "summer time". Reinaldo Goulart, a São Paulo businessman active in -# the railroad sector, writes (1999-07-06): -# The subject of time zones is currently a matter of discussion/debate in -# Brazil. Let's say that "the Brasília time" is considered the -# "official time" because Brasília is the capital city. -# The other three time zones are called "Brasília time "minus one" or -# "plus one" or "plus two". As far as I know there is no such -# name/designation as "Eastern Time" or "Central Time". -# So I invented the following (English-language) abbreviations for now. -# Corrections are welcome! -# std dst -# -2:00 FNT FNST Fernando de Noronha -# -3:00 BRT BRST Brasília -# -4:00 AMT AMST Amazon -# -5:00 ACT ACST Acre +# These tables use numeric abbreviations like -03 and -0330 for +# integer hour and minute UTC offsets. Although earlier editions used +# alphabetic time zone abbreviations, these abbreviations were +# invented and did not reflect common practice. ############################################################################### @@ -407,12 +385,6 @@ # # So I guess a new set of rules, besides "Arg", must be made and the last # America/Argentina/San_Luis entries should change to use these... -# -# I'm enclosing a patch that does what I say... regretfully, the San Luis -# timezone must be called "WART/WARST" even when most of the time (like, -# right now) WARST == ART... that is, since last Sunday, all the country -# is using UTC-3, but in my patch, San Luis calls it "WARST" and the rest -# of the country calls it "ART". # ... # From Alexander Krivenyshev (2010-04-09): @@ -451,11 +423,11 @@ # Buenos Aires (BA), Capital Federal (CF), Zone America/Argentina/Buenos_Aires -3:53:48 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May # Córdoba Mean Time - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 # # Córdoba (CB), Santa Fe (SF), Entre Ríos (ER), Corrientes (CN), Misiones (MN), # Chaco (CC), Formosa (FM), Santiago del Estero (SE) @@ -469,113 +441,113 @@ # Zone America/Argentina/Cordoba -4:16:48 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 # # Salta (SA), La Pampa (LP), Neuquén (NQ), Rio Negro (RN) Zone America/Argentina/Salta -4:21:40 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Tucumán (TM) Zone America/Argentina/Tucuman -4:20:52 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 13 - -3:00 Arg AR%sT + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 13 + -3:00 Arg -03/-02 # # La Rioja (LR) Zone America/Argentina/La_Rioja -4:27:24 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 1 - -4:00 - WART 1991 May 7 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 1 + -4:00 - -04 1991 May 7 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # San Juan (SJ) Zone America/Argentina/San_Juan -4:34:04 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 1 - -4:00 - WART 1991 May 7 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 May 31 - -4:00 - WART 2004 Jul 25 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 1 + -4:00 - -04 1991 May 7 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 May 31 + -4:00 - -04 2004 Jul 25 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Jujuy (JY) Zone America/Argentina/Jujuy -4:21:12 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1990 Mar 4 - -4:00 - WART 1990 Oct 28 - -4:00 1:00 WARST 1991 Mar 17 - -4:00 - WART 1991 Oct 6 - -3:00 1:00 ARST 1992 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1990 Mar 4 + -4:00 - -04 1990 Oct 28 + -4:00 1:00 -03 1991 Mar 17 + -4:00 - -04 1991 Oct 6 + -3:00 1:00 -02 1992 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Catamarca (CT), Chubut (CH) Zone America/Argentina/Catamarca -4:23:08 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1991 Mar 3 - -4:00 - WART 1991 Oct 20 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1991 Mar 3 + -4:00 - -04 1991 Oct 20 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Mendoza (MZ) Zone America/Argentina/Mendoza -4:35:16 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1990 Mar 4 - -4:00 - WART 1990 Oct 15 - -4:00 1:00 WARST 1991 Mar 1 - -4:00 - WART 1991 Oct 15 - -4:00 1:00 WARST 1992 Mar 1 - -4:00 - WART 1992 Oct 18 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 May 23 - -4:00 - WART 2004 Sep 26 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1990 Mar 4 + -4:00 - -04 1990 Oct 15 + -4:00 1:00 -03 1991 Mar 1 + -4:00 - -04 1991 Oct 15 + -4:00 1:00 -03 1992 Mar 1 + -4:00 - -04 1992 Oct 18 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 May 23 + -4:00 - -04 2004 Sep 26 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # San Luis (SL) @@ -584,44 +556,44 @@ Zone America/Argentina/San_Luis -4:25:24 - LMT 1894 Oct 31 -4:16:48 - CMT 1920 May - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1990 - -3:00 1:00 ARST 1990 Mar 14 - -4:00 - WART 1990 Oct 15 - -4:00 1:00 WARST 1991 Mar 1 - -4:00 - WART 1991 Jun 1 - -3:00 - ART 1999 Oct 3 - -4:00 1:00 WARST 2000 Mar 3 - -3:00 - ART 2004 May 31 - -4:00 - WART 2004 Jul 25 - -3:00 Arg AR%sT 2008 Jan 21 - -4:00 SanLuis WAR%sT 2009 Oct 11 - -3:00 - ART + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1990 + -3:00 1:00 -02 1990 Mar 14 + -4:00 - -04 1990 Oct 15 + -4:00 1:00 -03 1991 Mar 1 + -4:00 - -04 1991 Jun 1 + -3:00 - -03 1999 Oct 3 + -4:00 1:00 -03 2000 Mar 3 + -3:00 - -03 2004 May 31 + -4:00 - -04 2004 Jul 25 + -3:00 Arg -03/-02 2008 Jan 21 + -4:00 SanLuis -04/-03 2009 Oct 11 + -3:00 - -03 # # Santa Cruz (SC) Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31 - -4:16:48 - CMT 1920 May # Córdoba Mean Time - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 Jun 1 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:16:48 - CMT 1920 May + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 Jun 1 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # # Tierra del Fuego, Antártida e Islas del Atlántico Sur (TF) Zone America/Argentina/Ushuaia -4:33:12 - LMT 1894 Oct 31 - -4:16:48 - CMT 1920 May # Córdoba Mean Time - -4:00 - ART 1930 Dec - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1999 Oct 3 - -4:00 Arg AR%sT 2000 Mar 3 - -3:00 - ART 2004 May 30 - -4:00 - WART 2004 Jun 20 - -3:00 Arg AR%sT 2008 Oct 18 - -3:00 - ART + -4:16:48 - CMT 1920 May + -4:00 - -04 1930 Dec + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1999 Oct 3 + -4:00 Arg -04/-03 2000 Mar 3 + -3:00 - -03 2004 May 30 + -4:00 - -04 2004 Jun 20 + -3:00 Arg -03/-02 2008 Oct 18 + -3:00 - -03 # Aruba Link America/Curacao America/Aruba @@ -631,7 +603,7 @@ Zone America/La_Paz -4:32:36 - LMT 1890 -4:32:36 - CMT 1931 Oct 15 # Calamarca MT -4:32:36 1:00 BOST 1932 Mar 21 # Bolivia ST - -4:00 - BOT # Bolivia Time + -4:00 - -04 # Brazil @@ -983,12 +955,12 @@ # # Fernando de Noronha (administratively part of PE) Zone America/Noronha -2:09:40 - LMT 1914 - -2:00 Brazil FN%sT 1990 Sep 17 - -2:00 - FNT 1999 Sep 30 - -2:00 Brazil FN%sT 2000 Oct 15 - -2:00 - FNT 2001 Sep 13 - -2:00 Brazil FN%sT 2002 Oct 1 - -2:00 - FNT + -2:00 Brazil -02/-01 1990 Sep 17 + -2:00 - -02 1999 Sep 30 + -2:00 Brazil -02/-01 2000 Oct 15 + -2:00 - -02 2001 Sep 13 + -2:00 Brazil -02/-01 2002 Oct 1 + -2:00 - -02 # Other Atlantic islands have no permanent settlement. # These include Trindade and Martim Vaz (administratively part of ES), # Rocas Atoll (RN), and the St Peter and St Paul Archipelago (PE). @@ -1001,119 +973,119 @@ # In the north a very small part from the river Javary (now Jari I guess, # the border with Amapá) to the Amazon, then to the Xingu. Zone America/Belem -3:13:56 - LMT 1914 - -3:00 Brazil BR%sT 1988 Sep 12 - -3:00 - BRT + -3:00 Brazil -03/-02 1988 Sep 12 + -3:00 - -03 # # west Pará (PA) # West Pará includes Altamira, Óbidos, Prainha, Oriximiná, and Santarém. Zone America/Santarem -3:38:48 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT 2008 Jun 24 0:00 - -3:00 - BRT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 2008 Jun 24 0:00 + -3:00 - -03 # # Maranhão (MA), Piauí (PI), Ceará (CE), Rio Grande do Norte (RN), # Paraíba (PB) Zone America/Fortaleza -2:34:00 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1999 Sep 30 - -3:00 Brazil BR%sT 2000 Oct 22 - -3:00 - BRT 2001 Sep 13 - -3:00 Brazil BR%sT 2002 Oct 1 - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1999 Sep 30 + -3:00 Brazil -03/-02 2000 Oct 22 + -3:00 - -03 2001 Sep 13 + -3:00 Brazil -03/-02 2002 Oct 1 + -3:00 - -03 # # Pernambuco (PE) (except Atlantic islands) Zone America/Recife -2:19:36 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1999 Sep 30 - -3:00 Brazil BR%sT 2000 Oct 15 - -3:00 - BRT 2001 Sep 13 - -3:00 Brazil BR%sT 2002 Oct 1 - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1999 Sep 30 + -3:00 Brazil -03/-02 2000 Oct 15 + -3:00 - -03 2001 Sep 13 + -3:00 Brazil -03/-02 2002 Oct 1 + -3:00 - -03 # # Tocantins (TO) Zone America/Araguaina -3:12:48 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1995 Sep 14 - -3:00 Brazil BR%sT 2003 Sep 24 - -3:00 - BRT 2012 Oct 21 - -3:00 Brazil BR%sT 2013 Sep - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1995 Sep 14 + -3:00 Brazil -03/-02 2003 Sep 24 + -3:00 - -03 2012 Oct 21 + -3:00 Brazil -03/-02 2013 Sep + -3:00 - -03 # # Alagoas (AL), Sergipe (SE) Zone America/Maceio -2:22:52 - LMT 1914 - -3:00 Brazil BR%sT 1990 Sep 17 - -3:00 - BRT 1995 Oct 13 - -3:00 Brazil BR%sT 1996 Sep 4 - -3:00 - BRT 1999 Sep 30 - -3:00 Brazil BR%sT 2000 Oct 22 - -3:00 - BRT 2001 Sep 13 - -3:00 Brazil BR%sT 2002 Oct 1 - -3:00 - BRT + -3:00 Brazil -03/-02 1990 Sep 17 + -3:00 - -03 1995 Oct 13 + -3:00 Brazil -03/-02 1996 Sep 4 + -3:00 - -03 1999 Sep 30 + -3:00 Brazil -03/-02 2000 Oct 22 + -3:00 - -03 2001 Sep 13 + -3:00 Brazil -03/-02 2002 Oct 1 + -3:00 - -03 # # Bahia (BA) # There are too many Salvadors elsewhere, so use America/Bahia instead # of America/Salvador. Zone America/Bahia -2:34:04 - LMT 1914 - -3:00 Brazil BR%sT 2003 Sep 24 - -3:00 - BRT 2011 Oct 16 - -3:00 Brazil BR%sT 2012 Oct 21 - -3:00 - BRT + -3:00 Brazil -03/-02 2003 Sep 24 + -3:00 - -03 2011 Oct 16 + -3:00 Brazil -03/-02 2012 Oct 21 + -3:00 - -03 # # Goiás (GO), Distrito Federal (DF), Minas Gerais (MG), # Espírito Santo (ES), Rio de Janeiro (RJ), São Paulo (SP), Paraná (PR), # Santa Catarina (SC), Rio Grande do Sul (RS) Zone America/Sao_Paulo -3:06:28 - LMT 1914 - -3:00 Brazil BR%sT 1963 Oct 23 0:00 - -3:00 1:00 BRST 1964 - -3:00 Brazil BR%sT + -3:00 Brazil -03/-02 1963 Oct 23 0:00 + -3:00 1:00 -02 1964 + -3:00 Brazil -03/-02 # # Mato Grosso do Sul (MS) Zone America/Campo_Grande -3:38:28 - LMT 1914 - -4:00 Brazil AM%sT + -4:00 Brazil -04/-03 # # Mato Grosso (MT) Zone America/Cuiaba -3:44:20 - LMT 1914 - -4:00 Brazil AM%sT 2003 Sep 24 - -4:00 - AMT 2004 Oct 1 - -4:00 Brazil AM%sT + -4:00 Brazil -04/-03 2003 Sep 24 + -4:00 - -04 2004 Oct 1 + -4:00 Brazil -04/-03 # # Rondônia (RO) Zone America/Porto_Velho -4:15:36 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 # # Roraima (RR) Zone America/Boa_Vista -4:02:40 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT 1999 Sep 30 - -4:00 Brazil AM%sT 2000 Oct 15 - -4:00 - AMT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 1999 Sep 30 + -4:00 Brazil -04/-03 2000 Oct 15 + -4:00 - -04 # # east Amazonas (AM): Boca do Acre, Jutaí, Manaus, Floriano Peixoto # The great circle line from Tabatinga to Porto Acre divides # east from west Amazonas. Zone America/Manaus -4:00:04 - LMT 1914 - -4:00 Brazil AM%sT 1988 Sep 12 - -4:00 - AMT 1993 Sep 28 - -4:00 Brazil AM%sT 1994 Sep 22 - -4:00 - AMT + -4:00 Brazil -04/-03 1988 Sep 12 + -4:00 - -04 1993 Sep 28 + -4:00 Brazil -04/-03 1994 Sep 22 + -4:00 - -04 # # west Amazonas (AM): Atalaia do Norte, Boca do Maoco, Benjamin Constant, # Eirunepé, Envira, Ipixuna Zone America/Eirunepe -4:39:28 - LMT 1914 - -5:00 Brazil AC%sT 1988 Sep 12 - -5:00 - ACT 1993 Sep 28 - -5:00 Brazil AC%sT 1994 Sep 22 - -5:00 - ACT 2008 Jun 24 0:00 - -4:00 - AMT 2013 Nov 10 - -5:00 - ACT + -5:00 Brazil -05/-04 1988 Sep 12 + -5:00 - -05 1993 Sep 28 + -5:00 Brazil -05/-04 1994 Sep 22 + -5:00 - -05 2008 Jun 24 0:00 + -4:00 - -04 2013 Nov 10 + -5:00 - -05 # # Acre (AC) Zone America/Rio_Branco -4:31:12 - LMT 1914 - -5:00 Brazil AC%sT 1988 Sep 12 - -5:00 - ACT 2008 Jun 24 0:00 - -4:00 - AMT 2013 Nov 10 - -5:00 - ACT + -5:00 Brazil -05/-04 1988 Sep 12 + -5:00 - -05 2008 Jun 24 0:00 + -4:00 - -04 2013 Nov 10 + -5:00 - -05 # Chile @@ -1258,6 +1230,18 @@ # to mean 24:00 mainland time, not 24:00 local time, so that Easter # Island is always two hours behind the mainland. +# From Juan Correa (2016-12-04): +# Magallanes region ... will keep DST (UTC -3) all year round.... +# http://www.soychile.cl/Santiago/Sociedad/2016/12/04/433428/Bachelet-firmo-el-decreto-para-establecer-un-horario-unico-para-la-Region-de-Magallanes.aspx +# +# From Deborah Goldsmith (2017-01-19): +# http://www.diariooficial.interior.gob.cl/publicaciones/2017/01/17/41660/01/1169626.pdf +# From Paul Eggert (2017-01-19): +# The above says the Magallanes change expires 2019-05-11 at 24:00, +# so in theory, they will revert to -04/-03 after that, which means +# they will switch from -03 to -04 one hour after Santiago does that day. +# For now, assume that they will not revert. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Chile 1927 1931 - Sep 1 0:00 1:00 S Rule Chile 1928 1932 - Apr 1 0:00 0 - @@ -1298,22 +1282,35 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Santiago -4:42:46 - LMT 1890 -4:42:46 - SMT 1910 Jan 10 # Santiago Mean Time - -5:00 - CLT 1916 Jul 1 # Chile Time + -5:00 - -05 1916 Jul 1 -4:42:46 - SMT 1918 Sep 10 - -4:00 - CLT 1919 Jul 1 + -4:00 - -04 1919 Jul 1 -4:42:46 - SMT 1927 Sep 1 - -5:00 Chile CL%sT 1932 Sep 1 - -4:00 - CLT 1942 Jun 1 - -5:00 - CLT 1942 Aug 1 - -4:00 - CLT 1946 Jul 15 - -4:00 1:00 CLST 1946 Sep 1 # central Chile - -4:00 - CLT 1947 Apr 1 - -5:00 - CLT 1947 May 21 23:00 - -4:00 Chile CL%sT + -5:00 Chile -05/-04 1932 Sep 1 + -4:00 - -04 1942 Jun 1 + -5:00 - -05 1942 Aug 1 + -4:00 - -04 1946 Jul 15 + -4:00 1:00 -03 1946 Sep 1 # central Chile + -4:00 - -04 1947 Apr 1 + -5:00 - -05 1947 May 21 23:00 + -4:00 Chile -04/-03 +Zone America/Punta_Arenas -4:43:40 - LMT 1890 + -4:42:46 - SMT 1910 Jan 10 + -5:00 - -05 1916 Jul 1 + -4:42:46 - SMT 1918 Sep 10 + -4:00 - -04 1919 Jul 1 + -4:42:46 - SMT 1927 Sep 1 + -5:00 Chile -05/-04 1932 Sep 1 + -4:00 - -04 1942 Jun 1 + -5:00 - -05 1942 Aug 1 + -4:00 - -04 1947 Apr 1 + -5:00 - -05 1947 May 21 23:00 + -4:00 Chile -04/-03 2016 Dec 4 + -3:00 - -03 Zone Pacific/Easter -7:17:28 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time - -6:00 Chile EAS%sT + -7:00 Chile -07/-06 1982 Mar 14 3:00u # Easter Time + -6:00 Chile -06/-05 # # Salas y Gómez Island is uninhabited. # Other Chilean locations, including Juan Fernández Is, Desventuradas Is, @@ -1333,9 +1330,10 @@ # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Antarctica/Palmer 0 - -00 1965 - -4:00 Arg AR%sT 1969 Oct 5 - -3:00 Arg AR%sT 1982 May - -4:00 Chile CL%sT + -4:00 Arg -04/-03 1969 Oct 5 + -3:00 Arg -03/-02 1982 May + -4:00 Chile -04/-03 2016 Dec 4 + -3:00 - -03 # Colombia @@ -1348,7 +1346,7 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Bogota -4:56:16 - LMT 1884 Mar 13 -4:56:16 - BMT 1914 Nov 23 # Bogotá Mean Time - -5:00 CO CO%sT # Colombia Time + -5:00 CO -05/-04 # Malpelo, Providencia, San Andres # no information; probably like America/Bogota @@ -1372,7 +1370,7 @@ # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Curacao -4:35:47 - LMT 1912 Feb 12 # Willemstad - -4:30 - ANT 1965 # Netherlands Antilles Time + -4:30 - -0430 1965 -4:00 - AST # From Arthur David Olson (2011-06-15): @@ -1387,19 +1385,32 @@ # # Milne says the Central and South American Telegraph Company used -5:24:15. # -# From Paul Eggert (2007-03-04): -# Apparently Ecuador had a failed experiment with DST in 1992. -# <http://midena.gov.ec/content/view/1261/208/> (2007-02-27) and -# <http://www.hoy.com.ec/NoticiaNue.asp?row_id=249856> (2006-11-06) both -# talk about "hora Sixto". Leave this alone for now, as we have no data. +# From Alois Treindl (2016-12-15): +# http://www.elcomercio.com/actualidad/hora-sixto-1993.html +# ... Whether the law applied also to Galápagos, I do not know. +# From Paul Eggert (2016-12-15): +# http://www.elcomercio.com/afull/modificacion-husohorario-ecuador-presidentes-decreto.html +# This says President Sixto Durán Ballén signed decree No. 285, which +# established DST from 1992-11-28 to 1993-02-05; it does not give transition +# times. The people called it "hora de Sixto" ("Sixto hour"). The change did +# not go over well; a popular song "Qué hora es" by Jaime Guevara had lyrics +# that included "Amanecía en mitad de la noche, los guaguas iban a clase sin +# sol" ("It was dawning in the middle of the night, the buses went to class +# without sun"). Although Ballén's campaign slogan was "Ni un paso atrás" +# (Not one step back), the clocks went back in 1993 and the experiment was not +# repeated. For now, assume transitions were at 00:00 local time country-wide. +# +# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S +Rule Ecuador 1992 only - Nov 28 0:00 1:00 S +Rule Ecuador 1993 only - Feb 5 0:00 0 - # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Guayaquil -5:19:20 - LMT 1890 -5:14:00 - QMT 1931 # Quito Mean Time - -5:00 - ECT # Ecuador Time + -5:00 Ecuador -05/-04 Zone Pacific/Galapagos -5:58:24 - LMT 1931 # Puerto Baquerizo Moreno - -5:00 - ECT 1986 - -6:00 - GALT # Galápagos Time + -5:00 - -05 1986 + -6:00 Ecuador -06/-05 # Falklands @@ -1499,25 +1510,24 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/Stanley -3:51:24 - LMT 1890 -3:51:24 - SMT 1912 Mar 12 # Stanley Mean Time - -4:00 Falk FK%sT 1983 May # Falkland Is Time - -3:00 Falk FK%sT 1985 Sep 15 - -4:00 Falk FK%sT 2010 Sep 5 2:00 - -3:00 - FKST + -4:00 Falk -04/-03 1983 May + -3:00 Falk -03/-02 1985 Sep 15 + -4:00 Falk -04/-03 2010 Sep 5 2:00 + -3:00 - -03 # French Guiana # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Cayenne -3:29:20 - LMT 1911 Jul - -4:00 - GFT 1967 Oct # French Guiana Time - -3:00 - GFT + -4:00 - -04 1967 Oct + -3:00 - -03 # Guyana # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Guyana -3:52:40 - LMT 1915 Mar # Georgetown - -3:45 - GBGT 1966 May 26 # Br Guiana Time - -3:45 - GYT 1975 Jul 31 # Guyana Time - -3:00 - GYT 1991 + -3:45 - -0345 1975 Jul 31 + -3:00 - -03 1991 # IATA SSIM (1996-06) says -4:00. Assume a 1991 switch. - -4:00 - GYT + -4:00 - -04 # Paraguay # @@ -1609,9 +1619,9 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Asuncion -3:50:40 - LMT 1890 -3:50:40 - AMT 1931 Oct 10 # Asunción Mean Time - -4:00 - PYT 1972 Oct # Paraguay Time - -3:00 - PYT 1974 Apr - -4:00 Para PY%sT + -4:00 - -04 1972 Oct + -3:00 - -03 1974 Apr + -4:00 Para -04/-03 # Peru # @@ -1638,12 +1648,12 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Lima -5:08:12 - LMT 1890 -5:08:36 - LMT 1908 Jul 28 # Lima Mean Time? - -5:00 Peru PE%sT # Peru Time + -5:00 Peru -05/-04 # South Georgia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Atlantic/South_Georgia -2:26:08 - LMT 1890 # Grytviken - -2:00 - GST # South Georgia Time + -2:00 - -02 # South Sandwich Is # uninhabited; scientific personnel have wintered @@ -1653,9 +1663,8 @@ Zone America/Paramaribo -3:40:40 - LMT 1911 -3:40:52 - PMT 1935 # Paramaribo Mean Time -3:40:36 - PMT 1945 Oct # The capital moved? - -3:30 - NEGT 1975 Nov 20 # Dutch Guiana Time - -3:30 - SRT 1984 Oct # Suriname Time - -3:00 - SRT + -3:30 - -0330 1984 Oct + -3:00 - -03 # Trinidad and Tobago # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1758,11 +1767,16 @@ # [dated 2015-06-29; repeals Decree 311/006 dated 2006-09-04] Rule Uruguay 2006 2014 - Oct Sun>=1 2:00 1:00 S Rule Uruguay 2007 2015 - Mar Sun>=8 2:00 0 - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] + +# This Zone can be simplified once we assume zic %z. Zone America/Montevideo -3:44:44 - LMT 1898 Jun 28 -3:44:44 - MMT 1920 May 1 # Montevideo MT - -3:30 Uruguay UY%sT 1942 Dec 14 # Uruguay Time - -3:00 Uruguay UY%sT + -3:30 Uruguay -0330/-03 1942 Dec 14 + -3:00 Uruguay -03/-02 1968 + -3:00 Uruguay -03/-0230 1971 + -3:00 Uruguay -03/-02 1974 + -3:00 Uruguay -03/-0230 1974 Dec 22 + -3:00 Uruguay -03/-02 # Venezuela # @@ -1796,7 +1810,7 @@ # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Caracas -4:27:44 - LMT 1890 -4:27:40 - CMT 1912 Feb 12 # Caracas Mean Time? - -4:30 - VET 1965 Jan 1 0:00 # Venezuela T. - -4:00 - VET 2007 Dec 9 3:00 - -4:30 - VET 2016 May 1 2:30 - -4:00 - VET + -4:30 - -0430 1965 Jan 1 0:00 + -4:00 - -04 2007 Dec 9 3:00 + -4:30 - -0430 2016 May 1 2:30 + -4:00 - -04
--- a/test/sun/util/calendar/zi/tzdata/zone.tab Tue May 09 03:09:51 2017 +0100 +++ b/test/sun/util/calendar/zi/tzdata/zone.tab Tue May 09 04:03:50 2017 +0100 @@ -165,6 +165,7 @@ CI +0519-00402 Africa/Abidjan CK -2114-15946 Pacific/Rarotonga CL -3327-07040 America/Santiago Chile (most areas) +CL -5309-07055 America/Punta_Arenas Region of Magallanes CL -2709-10926 Pacific/Easter Easter Island CM +0403+00942 Africa/Douala CN +3114+12128 Asia/Shanghai Beijing Time @@ -262,7 +263,8 @@ KZ +4315+07657 Asia/Almaty Kazakhstan (most areas) KZ +4448+06528 Asia/Qyzylorda Qyzylorda/Kyzylorda/Kzyl-Orda KZ +5017+05710 Asia/Aqtobe Aqtobe/Aktobe -KZ +4431+05016 Asia/Aqtau Atyrau/Atirau/Gur'yev, Mangghystau/Mankistau +KZ +4431+05016 Asia/Aqtau Mangghystau/Mankistau +KZ +4707+05156 Asia/Atyrau Atyrau/Atirau/Gur'yev KZ +5113+05121 Asia/Oral West Kazakhstan LA +1758+10236 Asia/Vientiane LB +3353+03530 Asia/Beirut @@ -353,14 +355,15 @@ RU +5443+02030 Europe/Kaliningrad MSK-01 - Kaliningrad RU +554521+0373704 Europe/Moscow MSK+00 - Moscow area RU +4457+03406 Europe/Simferopol MSK+00 - Crimea -RU +4844+04425 Europe/Volgograd MSK+00 - Volgograd, Saratov +RU +4844+04425 Europe/Volgograd MSK+00 - Volgograd RU +5836+04939 Europe/Kirov MSK+00 - Kirov RU +4621+04803 Europe/Astrakhan MSK+01 - Astrakhan +RU +5134+04602 Europe/Saratov MSK+01 - Saratov +RU +5420+04824 Europe/Ulyanovsk MSK+01 - Ulyanovsk RU +5312+05009 Europe/Samara MSK+01 - Samara, Udmurtia -RU +5420+04824 Europe/Ulyanovsk MSK+01 - Ulyanovsk RU +5651+06036 Asia/Yekaterinburg MSK+02 - Urals RU +5500+07324 Asia/Omsk MSK+03 - Omsk -RU +5502+08255 Asia/Novosibirsk MSK+03 - Novosibirsk +RU +5502+08255 Asia/Novosibirsk MSK+04 - Novosibirsk RU +5322+08345 Asia/Barnaul MSK+04 - Altai RU +5630+08458 Asia/Tomsk MSK+04 - Tomsk RU +5345+08707 Asia/Novokuznetsk MSK+04 - Kemerovo @@ -418,7 +421,6 @@ UA +4837+02218 Europe/Uzhgorod Ruthenia UA +4750+03510 Europe/Zaporozhye Zaporozh'ye/Zaporizhia; Lugansk/Luhansk (east) UG +0019+03225 Africa/Kampala -UM +1645-16931 Pacific/Johnston Johnston Atoll UM +2813-17722 Pacific/Midway Midway Islands UM +1917+16637 Pacific/Wake Wake Island US +404251-0740023 America/New_York Eastern (most areas)