diff -Nru r-cran-tzdb-0.1.2/debian/changelog r-cran-tzdb-0.2.0/debian/changelog --- r-cran-tzdb-0.1.2/debian/changelog 2021-09-10 12:08:11.000000000 +0000 +++ r-cran-tzdb-0.2.0/debian/changelog 2021-10-28 01:50:04.000000000 +0000 @@ -1,3 +1,12 @@ +r-cran-tzdb (0.2.0-1) unstable; urgency=medium + + * New upstream release + + * debian/control: Set Build-Depends: to current R version + * debian/control: Set Standards-Version: to current version + + -- Dirk Eddelbuettel Wed, 27 Oct 2021 20:50:04 -0500 + r-cran-tzdb (0.1.2-2) unstable; urgency=medium * Simple rebuild for unstable following Debian 11 release, and passage diff -Nru r-cran-tzdb-0.1.2/debian/control r-cran-tzdb-0.2.0/debian/control --- r-cran-tzdb-0.1.2/debian/control 2021-07-29 13:49:23.000000000 +0000 +++ r-cran-tzdb-0.2.0/debian/control 2021-10-28 01:50:04.000000000 +0000 @@ -2,8 +2,8 @@ Section: gnu-r Priority: optional Maintainer: Dirk Eddelbuettel -Build-Depends: debhelper-compat (= 11), r-base-dev (>= 4.0.4), dh-r, r-cran-cpp11 -Standards-Version: 4.5.1 +Build-Depends: debhelper-compat (= 11), r-base-dev (>= 4.1.1), dh-r, r-cran-cpp11 +Standards-Version: 4.6.0 Vcs-Browser: https://salsa.debian.org/edd/r-cran-tzdb Vcs-Git: https://salsa.debian.org/edd/r-cran-tzdb.git Homepage: https://cran.r-project.org/package=tzdb diff -Nru r-cran-tzdb-0.1.2/DESCRIPTION r-cran-tzdb-0.2.0/DESCRIPTION --- r-cran-tzdb-0.1.2/DESCRIPTION 2021-07-20 17:50:02.000000000 +0000 +++ r-cran-tzdb-0.2.0/DESCRIPTION 2021-10-27 13:20:02.000000000 +0000 @@ -1,6 +1,6 @@ Package: tzdb Title: Time Zone Database Information -Version: 0.1.2 +Version: 0.2.0 Authors@R: c(person(given = "Davis", family = "Vaughan", @@ -26,17 +26,17 @@ BugReports: https://github.com/r-lib/tzdb/issues Depends: R (>= 3.3) Suggests: covr, testthat (>= 3.0.0) -LinkingTo: cpp11 (>= 0.2.7) +LinkingTo: cpp11 (>= 0.4.0) Biarch: yes Config/testthat/edition: 3 Encoding: UTF-8 -RoxygenNote: 7.1.1 +RoxygenNote: 7.1.2 SystemRequirements: C++11 NeedsCompilation: yes -Packaged: 2021-07-20 17:32:53 UTC; davis +Packaged: 2021-10-27 12:57:38 UTC; davis Author: Davis Vaughan [aut, cre], Howard Hinnant [cph] (Author of the included date library), RStudio [cph, fnd] Maintainer: Davis Vaughan Repository: CRAN -Date/Publication: 2021-07-20 17:50:02 UTC +Date/Publication: 2021-10-27 13:20:02 UTC diff -Nru r-cran-tzdb-0.1.2/inst/include/date/date.h r-cran-tzdb-0.2.0/inst/include/date/date.h --- r-cran-tzdb-0.1.2/inst/include/date/date.h 2021-07-20 17:04:20.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/include/date/date.h 2021-10-26 18:36:56.000000000 +0000 @@ -6231,8 +6231,13 @@ const std::chrono::seconds* offset_sec = nullptr) { using CT = typename std::common_type::type; - auto ld = floor(tp); - fields fds{year_month_day{ld}, hh_mm_ss{tp-local_seconds{ld}}}; + auto ld = std::chrono::time_point_cast(tp); + fields fds; + if (ld <= tp) + fds = fields{year_month_day{ld}, hh_mm_ss{tp-local_seconds{ld}}}; + else + fds = fields{year_month_day{ld - days{1}}, + hh_mm_ss{days{1} - (local_seconds{ld} - tp)}}; return to_stream(os, fmt, fds, abbrev, offset_sec); } @@ -6245,8 +6250,13 @@ using CT = typename std::common_type::type; const std::string abbrev("UTC"); CONSTDATA seconds offset{0}; - auto sd = floor(tp); - fields fds{year_month_day{sd}, hh_mm_ss{tp-sys_seconds{sd}}}; + auto sd = std::chrono::time_point_cast(tp); + fields fds; + if (sd <= tp) + fds = fields{year_month_day{sd}, hh_mm_ss{tp-sys_seconds{sd}}}; + else + fds = fields{year_month_day{sd - days{1}}, + hh_mm_ss{days{1} - (sys_seconds{sd} - tp)}}; return to_stream(os, fmt, fds, &abbrev, &offset); } @@ -6423,7 +6433,7 @@ is.setstate(std::ios::failbit); return 0; } - return i + f/std::pow(10.L, fcount); + return static_cast(i) + static_cast(f)/std::pow(10.L, fcount); } struct rs @@ -6789,7 +6799,7 @@ CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width; int tH; int tM; - long double S; + long double S{}; read(is, ru{tH, 1, 2}, CharT{':'}, ru{tM, 1, 2}, CharT{':'}, rld{S, 1, w}); checked_set(H, tH, not_a_hour, is); @@ -6869,7 +6879,7 @@ CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width; int tH = not_a_hour; int tM = not_a_minute; - long double S; + long double S{}; read(is, ru{tH, 1, 2}, CharT{':'}, ru{tM, 1, 2}, CharT{':'}, rld{S, 1, w}); checked_set(H, tH, not_a_hour, is); @@ -7224,7 +7234,7 @@ // "%I:%M:%S %p" using dfs = detail::decimal_format_seconds; CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width; - long double S; + long double S{}; int tI = not_a_hour_12_value; int tM = not_a_minute; read(is, ru{tI, 1, 2}, CharT{':'}, ru{tM, 1, 2}, @@ -7280,7 +7290,7 @@ { using dfs = detail::decimal_format_seconds; CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width; - long double S; + long double S{}; read(is, rld{S, 1, width == -1 ? w : static_cast(width)}); checked_set(s, round_i(duration{S}), not_a_second, is); @@ -7314,7 +7324,7 @@ CONSTDATA auto w = Duration::period::den == 1 ? 2 : 3 + dfs::width; int tH = not_a_hour; int tM = not_a_minute; - long double S; + long double S{}; read(is, ru{tH, 1, 2}, CharT{':'}, ru{tM, 1, 2}, CharT{':'}, rld{S, 1, w}); checked_set(H, tH, not_a_hour, is); @@ -8064,12 +8074,13 @@ { using Duration = std::chrono::duration; using CT = typename std::common_type::type; + using detail::round_i; fields fds{}; date::from_stream(is, fmt, fds, abbrev, offset); if (!fds.has_tod) is.setstate(std::ios::failbit); if (!is.fail()) - d = std::chrono::duration_cast(fds.tod.to_duration()); + d = round_i(fds.tod.to_duration()); return is; } @@ -8216,57 +8227,6 @@ return {format, tp, &abbrev, &offset}; } -#if HAS_STRING_VIEW - -// basic_string_view formats - -template -inline -auto -parse(std::basic_string_view format, Parsable& tp) - -> decltype(date::from_stream(std::declval&>(), format.data(), tp), - parse_manip{format, tp}) -{ - return {format, tp}; -} - -template -inline -auto -parse(std::basic_string_view format, - Parsable& tp, std::basic_string& abbrev) - -> decltype(date::from_stream(std::declval&>(), format.data(), - tp, &abbrev), - parse_manip{format, tp, &abbrev}) -{ - return {format, tp, &abbrev}; -} - -template -inline -auto -parse(std::basic_string_view format, Parsable& tp, std::chrono::minutes& offset) - -> decltype(date::from_stream(std::declval&>(), format.data(), - tp, std::declval*>(), &offset), - parse_manip{format, tp, nullptr, &offset}) -{ - return {format, tp, nullptr, &offset}; -} - -template -inline -auto -parse(std::basic_string_view format, Parsable& tp, - std::basic_string& abbrev, std::chrono::minutes& offset) - -> decltype(date::from_stream(std::declval&>(), format.data(), - tp, &abbrev, &offset), - parse_manip{format, tp, &abbrev, &offset}) -{ - return {format, tp, &abbrev, &offset}; -} - -#endif // HAS_STRING_VIEW - // duration streaming template diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/africa r-cran-tzdb-0.2.0/inst/tzdata/africa --- r-cran-tzdb-0.1.2/inst/tzdata/africa 2021-01-19 21:17:42.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/africa 2021-10-26 18:57:08.000000000 +0000 @@ -30,9 +30,6 @@ # Milne J. Civil time. Geogr J. 1899 Feb;13(2):173-94. # https://www.jstor.org/stable/1774359 # -# 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 @@ -153,8 +150,9 @@ # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Abidjan -0:16:08 - LMT 1912 0:00 - GMT +Link Africa/Abidjan Africa/Accra # Ghana Link Africa/Abidjan Africa/Bamako # Mali -Link Africa/Abidjan Africa/Banjul # Gambia +Link Africa/Abidjan Africa/Banjul # The Gambia Link Africa/Abidjan Africa/Conakry # Guinea Link Africa/Abidjan Africa/Dakar # Senegal Link Africa/Abidjan Africa/Freetown # Sierra Leone @@ -381,93 +379,8 @@ # Gabon # See Africa/Lagos. -# Gambia -# See Africa/Abidjan. - +# The Gambia # Ghana - -# From P Chan (2020-11-20): -# Interpretation Amendment Ordinance, 1915 (No.24 of 1915) [1915-11-02] -# Ordinances of the Gold Coast, Ashanti, Northern Territories 1915, p 69-71 -# https://books.google.com/books?id=ErA-AQAAIAAJ&pg=PA70 -# This Ordinance added "'Time' shall mean Greenwich Mean Time" to the -# Interpretation Ordinance, 1876. -# -# Determination of the Time Ordinance, 1919 (No. 18 of 1919) [1919-11-24] -# Ordinances of the Gold Coast, Ashanti, Northern Territories 1919, p 75-76 -# https://books.google.com/books?id=MbA-AQAAIAAJ&pg=PA75 -# This Ordinance removed the previous definition of time and introduced DST. -# -# Time Determination Ordinance (Cap. 214) -# The Laws of the Gold Coast (including Togoland Under British Mandate) -# Vol. II (1937), p 2328 -# https://books.google.com/books?id=Z7M-AQAAIAAJ&pg=PA2328 -# Revised edition of the 1919 Ordinance. -# -# Time Determination (Amendment) Ordinance, 1940 (No. 9 of 1940) [1940-04-06] -# Annual Volume of the Laws of the Gold Coast: -# Containing All Legislation Enacted During Year 1940, p 22 -# https://books.google.com/books?id=1ao-AQAAIAAJ&pg=PA22 -# This Ordinance changed the forward transition from September to May. -# -# Defence (Time Determination Ordinance Amendment) Regulations, 1942 -# (Regulations No. 6 of 1942) [1942-01-31, commenced on 1942-02-08] -# Annual Volume of the Laws of the Gold Coast: -# Containing All Legislation Enacted During Year 1942, p 48 -# https://books.google.com/books?id=Das-AQAAIAAJ&pg=PA48 -# These regulations advanced the [standard] time by thirty minutes. -# -# Defence (Time Determination Ordinance Amendment (No.2)) Regulations, -# 1942 (Regulations No. 28 of 1942) [1942-04-25] -# Annual Volume of the Laws of the Gold Coast: -# Containing All Legislation Enacted During Year 1942, p 87 -# https://books.google.com/books?id=Das-AQAAIAAJ&pg=PA87 -# These regulations abolished DST and changed the time to GMT+0:30. -# -# Defence (Revocation) (No.4) Regulations, 1945 (Regulations No. 45 of -# 1945) [1945-10-24, commenced on 1946-01-06] -# Annual Volume of the Laws of the Gold Coast: -# Containing All Legislation Enacted During Year 1945, p 256 -# https://books.google.com/books?id=9as-AQAAIAAJ&pg=PA256 -# These regulations revoked the previous two sets of Regulations. -# -# Time Determination (Amendment) Ordinance, 1945 (No. 18 of 1945) [1946-01-06] -# Annual Volume of the Laws of the Gold Coast: -# Containing All Legislation Enacted During Year 1945, p 69 -# https://books.google.com/books?id=9as-AQAAIAAJ&pg=PA69 -# This Ordinance abolished DST. -# -# Time Determination (Amendment) Ordinance, 1950 (No. 26 of 1950) [1950-07-22] -# Annual Volume of the Laws of the Gold Coast: -# Containing All Legislation Enacted During Year 1950, p 35 -# https://books.google.com/books?id=e60-AQAAIAAJ&pg=PA35 -# This Ordinance restored DST but with thirty minutes offset. -# -# Time Determination Ordinance (Cap. 264) -# The Laws of the Gold Coast, Vol. V (1954), p 380 -# https://books.google.com/books?id=Mqc-AQAAIAAJ&pg=PA380 -# Revised edition of the Time Determination Ordinance. -# -# Time Determination (Amendment) Ordinance, 1956 (No. 21 of 1956) [1956-08-29] -# Annual Volume of the Ordinances of the Gold Coast Enacted During the -# Year 1956, p 83 -# https://books.google.com/books?id=VLE-AQAAIAAJ&pg=PA83 -# This Ordinance abolished DST. - -# Rule NAME FROM TO - IN ON AT SAVE LETTER/S -Rule Ghana 1919 only - Nov 24 0:00 0:20 +0020 -Rule Ghana 1920 1942 - Jan 1 2:00 0 GMT -Rule Ghana 1920 1939 - Sep 1 2:00 0:20 +0020 -Rule Ghana 1940 1941 - May 1 2:00 0:20 +0020 -Rule Ghana 1950 1955 - Sep 1 2:00 0:30 +0030 -Rule Ghana 1951 1956 - Jan 1 2:00 0 GMT - -# Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone Africa/Accra -0:00:52 - LMT 1915 Nov 2 - 0:00 Ghana %s 1942 Feb 8 - 0:30 - +0030 1946 Jan 6 - 0:00 Ghana %s - # Guinea # See Africa/Abidjan. @@ -732,7 +645,7 @@ # See Africa/Nairobi. # Morocco -# See the 'europe' file for Spanish Morocco (Africa/Ceuta). +# See Africa/Ceuta for Spanish Morocco. # From Alex Krivenyshev (2008-05-09): # Here is an article that Morocco plan to introduce Daylight Saving Time between @@ -1382,23 +1295,21 @@ 0:13:35 - LMT 1914 Jan 1 0:30 - +0030 1919 Sep 1 1:00 - WAT -Link Africa/Lagos Africa/Bangui # Central African Republic -Link Africa/Lagos Africa/Brazzaville # Rep. of the Congo -Link Africa/Lagos Africa/Douala # Cameroon -Link Africa/Lagos Africa/Kinshasa # Dem. Rep. of the Congo (west) -Link Africa/Lagos Africa/Libreville # Gabon -Link Africa/Lagos Africa/Luanda # Angola -Link Africa/Lagos Africa/Malabo # Equatorial Guinea -Link Africa/Lagos Africa/Niamey # Niger -Link Africa/Lagos Africa/Porto-Novo # Benin +Link Africa/Lagos Africa/Bangui # Central African Republic +Link Africa/Lagos Africa/Brazzaville # Rep. of the Congo +Link Africa/Lagos Africa/Douala # Cameroon +Link Africa/Lagos Africa/Kinshasa # Dem. Rep. of the Congo (west) +Link Africa/Lagos Africa/Libreville # Gabon +Link Africa/Lagos Africa/Luanda # Angola +Link Africa/Lagos Africa/Malabo # Equatorial Guinea +Link Africa/Lagos Africa/Niamey # Niger +Link Africa/Lagos Africa/Porto-Novo # Benin # Réunion # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis 4:00 - +04 # -# Crozet Islands also observes Réunion time; see the 'antarctica' file. -# # Scattered Islands (Îles Éparses) administered from Réunion are as follows. # The following information about them is taken from # Îles Éparses (, 1997-07-22, @@ -1490,8 +1401,8 @@ Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8 1:30 - SAST 1903 Mar 2:00 SA SAST -Link Africa/Johannesburg Africa/Maseru # Lesotho -Link Africa/Johannesburg Africa/Mbabane # Eswatini +Link Africa/Johannesburg Africa/Maseru # Lesotho +Link Africa/Johannesburg Africa/Mbabane # Eswatini # # Marion and Prince Edward Is # scientific station since 1947 @@ -1527,12 +1438,13 @@ 3:00 - EAT 2017 Nov 1 2:00 - CAT +# South Sudan + # From Steffen Thorsen (2021-01-18): # "South Sudan will change its time zone by setting the clock back 1 # hour on February 1, 2021...." # from https://eyeradio.org/south-sudan-adopts-new-time-zone-makuei/ -# South Sudan # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Juba 2:06:28 - LMT 1931 2:00 Sudan CA%sT 2000 Jan 15 12:00 @@ -1637,7 +1549,7 @@ Rule Tunisia 2006 2008 - Mar lastSun 2:00s 1:00 S Rule Tunisia 2006 2008 - Oct lastSun 2:00s 0 - -# See Europe/Paris for PMT-related transitions. +# See Europe/Paris commentary for PMT-related transitions. # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Africa/Tunis 0:40:44 - LMT 1881 May 12 0:09:21 - PMT 1911 Mar 11 # Paris Mean Time diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/antarctica r-cran-tzdb-0.2.0/inst/tzdata/antarctica --- r-cran-tzdb-0.1.2/inst/tzdata/antarctica 2020-10-03 22:07:12.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/antarctica 2021-10-26 18:57:08.000000000 +0000 @@ -148,7 +148,7 @@ # # Alfred Faure, Possession Island, Crozet Islands, -462551+0515152, since 1964; # sealing & whaling stations operated variously 1802/1911+; -# see Indian/Reunion. +# see Asia/Dubai. # # Martin-de-Viviès, Amsterdam Island, -374105+0773155, since 1950 # Port-aux-Français, Kerguelen Islands, -492110+0701303, since 1951; @@ -162,17 +162,7 @@ 5:00 - +05 # # year-round base in the main continent -# Dumont d'Urville, Île des Pétrels, -6640+14001, since 1956-11 -# (2005-12-05) -# -# Another base at Port-Martin, 50km east, began operation in 1947. -# It was destroyed by fire on 1952-01-14. -# -# Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone Antarctica/DumontDUrville 0 - -00 1947 - 10:00 - +10 1952 Jan 14 - 0 - -00 1956 Nov - 10:00 - +10 +# Dumont d'Urville - see Pacific/Port_Moresby. # France & Italy - year-round base # Concordia, -750600+1232000, since 2005 @@ -188,20 +178,7 @@ # Zuchelli, Terra Nova Bay, -744140+1640647, since 1986 # Japan - year-round bases -# Syowa (also known as Showa), -690022+0393524, since 1957 -# -# From Hideyuki Suzuki (1999-02-06): -# In all Japanese stations, +0300 is used as the standard time. -# -# Syowa station, which is the first antarctic station of Japan, -# was established on 1957-01-29. Since Syowa station is still the main -# station of Japan, it's appropriate for the principal location. -# Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone Antarctica/Syowa 0 - -00 1957 Jan 29 - 3:00 - +03 -# See: -# NIPR Antarctic Research Activities (1999-08-17) -# http://www.nipr.ac.jp/english/ara01.html +# See Asia/Riyadh. # S Korea - year-round base # Jang Bogo, Terra Nova Bay, -743700+1641205 since 2014 diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/asia r-cran-tzdb-0.2.0/inst/tzdata/asia --- r-cran-tzdb-0.1.2/inst/tzdata/asia 2020-10-27 18:32:24.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/asia 2021-10-26 18:57:08.000000000 +0000 @@ -34,9 +34,6 @@ # Byalokoz EL. New Counting of Time in Russia since July 1, 1919. # (See the 'europe' file for a fuller citation.) # -# A reliable and entertaining source about time zones is -# Derek Howse, Greenwich time and longitude, Philip Wilson Publishers (1997). -# # The following alphabetic abbreviations appear in these tables # (corrections are welcome): # std dst @@ -2234,6 +2231,14 @@ # From Paul Eggert (2013-12-11): # As Steffen suggested, consider the past 21-month experiment to be DST. +# From Steffen Thorsen (2021-09-24): +# The Jordanian Government announced yesterday that they will start DST +# in February instead of March: +# https://petra.gov.jo/Include/InnerPage.jsp?ID=37683&lang=en&name=en_news (English) +# https://petra.gov.jo/Include/InnerPage.jsp?ID=189969&lang=ar&name=news (Arabic) +# From the Arabic version, it seems to say it would be at midnight +# (assume 24:00) on the last Thursday in February, starting from 2022. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Jordan 1973 only - Jun 6 0:00 1:00 S Rule Jordan 1973 1975 - Oct 1 0:00 0 - @@ -2264,8 +2269,9 @@ Rule Jordan 2005 only - Sep lastFri 0:00s 0 - Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 - Rule Jordan 2013 only - Dec 20 0:00 0 - -Rule Jordan 2014 max - Mar lastThu 24:00 1:00 S +Rule Jordan 2014 2021 - Mar lastThu 24:00 1:00 S Rule Jordan 2014 max - Oct lastFri 0:00s 0 - +Rule Jordan 2022 max - Feb lastThu 24:00 1:00 S # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Amman 2:23:44 - LMT 1931 2:00 Jordan EE%sT @@ -2740,7 +2746,8 @@ # # peninsular Malaysia # taken from Mok Ly Yng (2003-10-30) -# http://www.math.nus.edu.sg/aslaksen/teaching/timezone.html +# https://web.archive.org/web/20190822231045/http://www.math.nus.edu.sg/~mathelmr/teaching/timezone.html +# This agrees with Singapore since 1905-06-01. # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Kuala_Lumpur 6:46:46 - LMT 1901 Jan 1 6:55:25 - SMT 1905 Jun 1 # Singapore M.T. @@ -3379,11 +3386,6 @@ # shall [end] on Oct 24th 2020 at 01:00AM by delaying the clock by 60 minutes. # http://www.palestinecabinet.gov.ps/portal/Meeting/Details/51584 -# From Tim Parenti (2020-10-20): -# Predict future fall transitions at 01:00 on the Saturday preceding October's -# last Sunday (i.e., Sat>=24). This is consistent with our predictions since -# 2016, although the time of the change differed slightly in 2019. - # From Pierre Cashon (2020-10-20): # The summer time this year started on March 28 at 00:00. # https://wafa.ps/ar_page.aspx?id=GveQNZa872839351758aGveQNZ @@ -3396,6 +3398,17 @@ # For now, guess spring-ahead transitions are at 00:00 on the Saturday # preceding March's last Sunday (i.e., Sat>=24). +# From P Chan (2021-10-18): +# http://wafa.ps/Pages/Details/34701 +# Palestine winter time will start from midnight 2021-10-29 (Thursday-Friday). +# +# From Heba Hemad, Palestine Ministry of Telecom & IT (2021-10-20): +# ... winter time will begin in Palestine from Friday 10-29, 01:00 AM +# by 60 minutes backwards. +# +# From Paul Eggert (2021-10-20): +# Guess future fall transitions on October's last Friday at 01:00. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S Rule EgyptAsia 1957 1958 - Oct 1 0:00 0 - @@ -3431,7 +3444,8 @@ Rule Palestine 2019 only - Mar 29 0:00 1:00 S Rule Palestine 2019 only - Oct Sat>=24 0:00 0 - Rule Palestine 2020 max - Mar Sat>=24 0:00 1:00 S -Rule Palestine 2020 max - Oct Sat>=24 1:00 0 - +Rule Palestine 2020 only - Oct 24 1:00 0 - +Rule Palestine 2021 max - Oct lastFri 1:00 0 - # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct @@ -3500,6 +3514,12 @@ # influence of the sources. There is no current abbreviation for DST, # so use "PDT", the usual American style. +# From P Chan (2021-05-10): +# Here's a fairly comprehensive article in Japanese: +# https://wiki.suikawiki.org/n/Philippine%20Time +# From Paul Eggert (2021-05-10): +# The info in the Japanese table has not been absorbed (yet) below. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Phil 1936 only - Nov 1 0:00 1:00 D Rule Phil 1937 only - Feb 1 0:00 0 S @@ -3566,12 +3586,13 @@ # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14 3:00 - +03 +Link Asia/Riyadh Antarctica/Syowa Link Asia/Riyadh Asia/Aden # Yemen Link Asia/Riyadh Asia/Kuwait # Singapore # taken from Mok Ly Yng (2003-10-30) -# http://www.math.nus.edu.sg/aslaksen/teaching/timezone.html +# https://web.archive.org/web/20190822231045/http://www.math.nus.edu.sg/~mathelmr/teaching/timezone.html # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Asia/Singapore 6:55:25 - LMT 1901 Jan 1 6:55:25 - SMT 1905 Jun 1 # Singapore M.T. diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/australasia r-cran-tzdb-0.2.0/inst/tzdata/australasia --- r-cran-tzdb-0.1.2/inst/tzdata/australasia 2020-12-05 18:32:08.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/australasia 2021-10-26 18:57:08.000000000 +0000 @@ -385,9 +385,22 @@ # "Minister for Employment, Parveen Bala says they had never thought of # stopping daylight saving. He says it was just to decide on when it should # start and end. Bala says it is a short period..." -# Since the end date is still in line with our ongoing predictions, assume for -# now that the later-than-usual start date is a one-time departure from the -# recent second Sunday in November pattern. +# +# From Tim Parenti (2021-10-11), per Jashneel Kumar (2021-10-11) and P Chan +# (2021-10-12): +# https://www.fiji.gov.fj/Media-Centre/Speeches/English/PM-BAINIMARAMA-S-COVID-19-ANNOUNCEMENT-10-10-21 +# https://www.fbcnews.com.fj/news/covid-19/curfew-moved-back-to-11pm/ +# In a 2021-10-10 speech concerning updated Covid-19 mitigation measures in +# Fiji, prime minister Josaia Voreqe "Frank" Bainimarama announced the +# suspension of DST for the 2021/2022 season: "Given that we are in the process +# of readjusting in the midst of so many changes, we will also put Daylight +# Savings Time on hold for this year. It will also make the reopening of +# scheduled commercial air service much smoother if we don't have to be +# concerned shifting arrival and departure times, which may look like a simple +# thing but requires some significant logistical adjustments domestically and +# internationally." +# Assume for now that DST will resume with the recent pre-2020 rules for the +# 2022/2023 season. # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 - @@ -399,10 +412,11 @@ Rule Fiji 2012 2013 - Jan Sun>=18 3:00 0 - Rule Fiji 2014 only - Jan Sun>=18 2:00 0 - Rule Fiji 2014 2018 - Nov Sun>=1 2:00 1:00 - -Rule Fiji 2015 max - Jan Sun>=12 3:00 0 - +Rule Fiji 2015 2021 - Jan Sun>=12 3:00 0 - Rule Fiji 2019 only - Nov Sun>=8 2:00 1:00 - Rule Fiji 2020 only - Dec 20 2:00 1:00 - -Rule Fiji 2021 max - Nov Sun>=8 2:00 1:00 - +Rule Fiji 2022 max - Nov Sun>=8 2:00 1:00 - +Rule Fiji 2023 max - Jan Sun>=12 3:00 0 - # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva 12:00 Fiji +12/+13 @@ -464,7 +478,7 @@ # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Pacific/Tarawa 11:32:04 - LMT 1901 # Bairiki 12:00 - +12 -Zone Pacific/Enderbury -11:24:20 - LMT 1901 +Zone Pacific/Kanton 0 - -00 1937 Aug 31 -12:00 - -12 1979 Oct -11:00 - -11 1994 Dec 31 13:00 - +13 @@ -597,13 +611,46 @@ # was probably like Pacific/Auckland # Cook Is -# From Shanks & Pottenger: +# +# From Alexander Krivenyshev (2021-03-24): +# In 1899 the Cook Islands celebrated Christmas twice to correct the calendar. +# According to the old books, missionaries were unaware of +# the International Date line, when they came from Sydney. +# Thus the Cook Islands were one day ahead.... +# http://nzetc.victoria.ac.nz/tm/scholarly/tei-KloDisc-t1-body-d18.html +# ... Appendix to the Journals of the House of Representatives, 1900 +# https://atojs.natlib.govt.nz/cgi-bin/atojs?a=d&d=AJHR1900-I.2.1.2.3 +# (page 20) +# +# From Michael Deckers (2021-03-24): +# ... in the Cook Island Act of 1915-10-11, online at +# http://www.paclii.org/ck/legis/ck-nz_act/cia1915132/ +# "651. The hour of the day shall in each of the islands included in the +# Cook Islands be determined in accordance with the meridian of that island." +# so that local (mean?) time was still used in Rarotonga (and Niue) in 1915. +# This was changed in the Cook Island Amendment Act of 1952-10-16 ... +# http://www.paclii.org/ck/legis/ck-nz_act/ciaa1952212/ +# "651 (1) The hour of the day in each of the islands included in the Cook +# Islands, other than Niue, shall be determined as if each island were +# situated on the meridian one hundred and fifty-seven degrees thirty minutes +# West of Greenwich. (2) The hour of the day in the Island of Niue shall be +# determined as if that island were situated on the meridian one hundred and +# seventy degrees West of Greenwich." +# This act does not state when it takes effect, so one has to assume it +# applies since 1952-10-16. But there is the possibility that the act just +# legalized prior existing practice, as we had seen with the Guernsey law of +# 1913-06-18 for the switch in 1909-04-19. +# +# From Paul Eggert (2021-03-24): +# Transitions after 1952 are from Shanks & Pottenger. +# # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Cook 1978 only - Nov 12 0:00 0:30 - Rule Cook 1979 1991 - Mar Sun>=1 0:00 0 - Rule Cook 1979 1990 - Oct lastSun 0:00 0:30 - # Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone Pacific/Rarotonga -10:39:04 - LMT 1901 # Avarua +Zone Pacific/Rarotonga 13:20:56 - LMT 1899 Dec 26 # Avarua + -10:39:04 - LMT 1952 Oct 16 -10:30 - -1030 1978 Nov 12 -10:00 Cook -10/-0930 @@ -611,10 +658,18 @@ # Niue +# See Pacific/Raratonga comments for 1952 transition. +# +# From Tim Parenti (2021-09-13): +# Consecutive contemporaneous editions of The Air Almanac listed -11:20 for +# Niue as of Apr 1964 but -11 as of Aug 1964: +# Apr 1964: https://books.google.com/books?id=_1So677Y5vUC&pg=SL1-PA23 +# Aug 1964: https://books.google.com/books?id=MbJloqd-zyUC&pg=SL1-PA23 +# Without greater specificity, guess 1964-07-01 for this transition. + # Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone Pacific/Niue -11:19:40 - LMT 1901 # Alofi - -11:20 - -1120 1951 - -11:30 - -1130 1978 Oct 1 +Zone Pacific/Niue -11:19:40 - LMT 1952 Oct 16 # Alofi + -11:20 - -1120 1964 Jul -11:00 - -11 # Norfolk @@ -638,6 +693,7 @@ Zone Pacific/Port_Moresby 9:48:40 - LMT 1880 9:48:32 - PMMT 1895 # Port Moresby Mean Time 10:00 - +10 +Link Pacific/Port_Moresby Antarctica/DumontDUrville # # From Paul Eggert (2014-10-13): # Base the Bougainville entry on the Arawa-Kieta region, which appears to have @@ -742,13 +798,17 @@ # From Paul Eggert (2014-07-08): # That web page currently lists transitions for 2012/3 and 2013/4. # Assume the pattern instituted in 2012 will continue indefinitely. +# +# From Geoffrey D. Bennett (2021-09-20): +# https://www.mcil.gov.ws/storage/2021/09/MCIL-Scan_20210920_120553.pdf +# DST has been cancelled for this year. # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule WS 2010 only - Sep lastSun 0:00 1 - Rule WS 2011 only - Apr Sat>=1 4:00 0 - Rule WS 2011 only - Sep lastSat 3:00 1 - -Rule WS 2012 max - Apr Sun>=1 4:00 0 - -Rule WS 2012 max - Sep lastSun 3:00 1 - +Rule WS 2012 2021 - Apr Sun>=1 4:00 0 - +Rule WS 2012 2020 - Sep lastSun 3:00 1 - # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Pacific/Apia 12:33:04 - LMT 1892 Jul 5 -11:26:56 - LMT 1911 @@ -795,8 +855,8 @@ Rule Tonga 2016 only - Nov Sun>=1 2:00 1:00 - Rule Tonga 2017 only - Jan Sun>=15 3:00 0 - # Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone Pacific/Tongatapu 12:19:20 - LMT 1901 - 12:20 - +1220 1941 +Zone Pacific/Tongatapu 12:19:12 - LMT 1945 Sep 10 + 12:20 - +1220 1961 13:00 - +13 1999 13:00 Tonga +13/+14 @@ -1738,6 +1798,23 @@ # One source for this is page 202 of: Bartky IR. One Time Fits All: # The Campaigns for Global Uniformity (2007). +# Kanton + +# From Paul Eggert (2021-05-27): +# Kiribati's +13 timezone is represented by Kanton, its only populated +# island. (It was formerly spelled "Canton", but Gilbertese lacks "C".) +# Kanton was settled on 1937-08-31 by two British radio operators +# ; +# Americans came the next year and built an airfield, partly to +# establish airline service and perhaps partly anticipating the +# next war. Aside from the war, the airfield was used by commercial +# airlines until long-range jets became standard; although currently +# for emergency use only, China says it is considering rebuilding the +# airfield for high-end niche tourism. Kanton has about two dozen +# people, caretakers who rotate in from the rest of Kiribati in 2-5 +# year shifts, and who use some of the leftover structures +# . + # Kwajalein # From an AP article (1993-08-22): @@ -2021,6 +2098,17 @@ # Tonga +# From Paul Eggert (2021-03-04): +# In 1943 "The standard time kept is 12 hrs. 19 min. 12 sec. fast +# on Greenwich mean time." according to the Admiralty's Hydrographic +# Dept., Pacific Islands Pilot, Vol. II, 7th ed., 1943, p 360. + +# From Michael Deckers (2021-03-03): +# [Ian R Bartky: "One Time Fits All: The Campaigns for Global Uniformity". +# Stanford University Press. 2007. p. 255]: +# On 10 September 1945 Tonga adopted a standard time 12 hours, +# 20 minutes in advance of Greenwich. + # From Paul Eggert (1996-01-22): # Today's _Wall Street Journal_ (p 1) reports that "Tonga has been plotting # to sneak ahead of [New Zealanders] by introducing daylight-saving time." @@ -2049,9 +2137,26 @@ # The Crown Prince, presented an unanswerable argument: "Remember that # on the World Day of Prayer, you would be the first people on Earth # to say your prayers in the morning." - -# From Paul Eggert (2006-03-22): -# Shanks & Pottenger say the transition was on 1968-10-01; go with Mundell. +# +# From Tim Parenti (2021-09-13), per Paul Eggert (2006-03-22) and Michael +# Deckers (2021-03-03): +# Mundell places the transition from +12:20 to +13 in 1941, while Shanks & +# Pottenger say the transition was on 1968-10-01. +# +# The Air Almanac published contemporaneous tables of standard times, +# which listed +12:20 as of Nov 1960 and +13 as of Mar 1961: +# Nov 1960: https://books.google.com/books?id=bVgtWM6kPZUC&pg=SL1-PA19 +# Mar 1961: https://books.google.com/books?id=W2nItAul4g0C&pg=SL1-PA19 +# (Thanks to P Chan for pointing us toward these sources.) +# This agrees with Bartky, who writes that "since 1961 [Tonga's] official time +# has been thirteen hours in advance of Greenwich time" (p. 202) and further +# writes in an endnote that this was because "the legislation was amended" on +# 1960-10-19. (p. 255) +# +# Without greater specificity, presume that Bartky and the Air Almanac point to +# a 1961-01-01 transition, as Tāufaʻāhau Tupou IV was still Crown Prince in +# 1961 and this still jives with the gist of Mundell's telling, and go with +# this over Shanks & Pottenger. # From Eric Ulevik (1999-05-03): # Tonga's director of tourism, who is also secretary of the National Millennium diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/backward r-cran-tzdb-0.2.0/inst/tzdata/backward --- r-cran-tzdb-0.1.2/inst/tzdata/backward 2020-11-24 23:40:34.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/backward 2021-10-26 18:57:08.000000000 +0000 @@ -3,8 +3,10 @@ # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. -# This file provides links between current names for timezones -# and their old names. Many names changed in late 1993. +# This file provides links from old or merged timezone names to current ones. +# Many names changed in late 1993. Several of these names are +# also present in the file 'backzone', which has data important only +# for pre-1970 timestamps and so is out of scope for tzdb proper. # Link TARGET LINK-NAME Link Africa/Nairobi Africa/Asmera @@ -13,7 +15,7 @@ Link America/Adak America/Atka Link America/Argentina/Buenos_Aires America/Buenos_Aires Link America/Argentina/Catamarca America/Catamarca -Link America/Atikokan America/Coral_Harbour +Link America/Panama America/Coral_Harbour Link America/Argentina/Cordoba America/Cordoba Link America/Tijuana America/Ensenada Link America/Indiana/Indianapolis America/Fort_Wayne @@ -28,7 +30,7 @@ Link America/Argentina/Cordoba America/Rosario Link America/Tijuana America/Santa_Isabel Link America/Denver America/Shiprock -Link America/Port_of_Spain America/Virgin +Link America/Puerto_Rico America/Virgin Link Pacific/Auckland Antarctica/South_Pole Link Asia/Ashgabat Asia/Ashkhabad Link Asia/Kolkata Asia/Calcutta @@ -103,6 +105,7 @@ Link Pacific/Chatham NZ-CHAT Link America/Denver Navajo Link Asia/Shanghai PRC +Link Pacific/Kanton Pacific/Enderbury Link Pacific/Honolulu Pacific/Johnston Link Pacific/Pohnpei Pacific/Ponape Link Pacific/Pago_Pago Pacific/Samoa diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/backzone r-cran-tzdb-0.2.0/inst/tzdata/backzone --- r-cran-tzdb-0.1.2/inst/tzdata/backzone 2020-11-24 23:40:34.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/backzone 2021-10-26 18:57:08.000000000 +0000 @@ -68,6 +68,91 @@ # # As explained in the zic man page, the zone columns are: # Zone NAME STDOFF RULES FORMAT [UNTIL] +# and the rule columns are: +# Rule NAME FROM TO - IN ON AT SAVE LETTER/S + + +# Ghana + +# From P Chan (2020-11-20): +# Interpretation Amendment Ordinance, 1915 (No.24 of 1915) [1915-11-02] +# Ordinances of the Gold Coast, Ashanti, Northern Territories 1915, p 69-71 +# https://books.google.com/books?id=ErA-AQAAIAAJ&pg=PA70 +# This Ordinance added "'Time' shall mean Greenwich Mean Time" to the +# Interpretation Ordinance, 1876. +# +# Determination of the Time Ordinance, 1919 (No. 18 of 1919) [1919-11-24] +# Ordinances of the Gold Coast, Ashanti, Northern Territories 1919, p 75-76 +# https://books.google.com/books?id=MbA-AQAAIAAJ&pg=PA75 +# This Ordinance removed the previous definition of time and introduced DST. +# +# Time Determination Ordinance (Cap. 214) +# The Laws of the Gold Coast (including Togoland Under British Mandate) +# Vol. II (1937), p 2328 +# https://books.google.com/books?id=Z7M-AQAAIAAJ&pg=PA2328 +# Revised edition of the 1919 Ordinance. +# +# Time Determination (Amendment) Ordinance, 1940 (No. 9 of 1940) [1940-04-06] +# Annual Volume of the Laws of the Gold Coast: +# Containing All Legislation Enacted During Year 1940, p 22 +# https://books.google.com/books?id=1ao-AQAAIAAJ&pg=PA22 +# This Ordinance changed the forward transition from September to May. +# +# Defence (Time Determination Ordinance Amendment) Regulations, 1942 +# (Regulations No. 6 of 1942) [1942-01-31, commenced on 1942-02-08] +# Annual Volume of the Laws of the Gold Coast: +# Containing All Legislation Enacted During Year 1942, p 48 +# https://books.google.com/books?id=Das-AQAAIAAJ&pg=PA48 +# These regulations advanced the [standard] time by thirty minutes. +# +# Defence (Time Determination Ordinance Amendment (No.2)) Regulations, +# 1942 (Regulations No. 28 of 1942) [1942-04-25] +# Annual Volume of the Laws of the Gold Coast: +# Containing All Legislation Enacted During Year 1942, p 87 +# https://books.google.com/books?id=Das-AQAAIAAJ&pg=PA87 +# These regulations abolished DST and changed the time to GMT+0:30. +# +# Defence (Revocation) (No.4) Regulations, 1945 (Regulations No. 45 of +# 1945) [1945-10-24, commenced on 1946-01-06] +# Annual Volume of the Laws of the Gold Coast: +# Containing All Legislation Enacted During Year 1945, p 256 +# https://books.google.com/books?id=9as-AQAAIAAJ&pg=PA256 +# These regulations revoked the previous two sets of Regulations. +# +# Time Determination (Amendment) Ordinance, 1945 (No. 18 of 1945) [1946-01-06] +# Annual Volume of the Laws of the Gold Coast: +# Containing All Legislation Enacted During Year 1945, p 69 +# https://books.google.com/books?id=9as-AQAAIAAJ&pg=PA69 +# This Ordinance abolished DST. +# +# Time Determination (Amendment) Ordinance, 1950 (No. 26 of 1950) [1950-07-22] +# Annual Volume of the Laws of the Gold Coast: +# Containing All Legislation Enacted During Year 1950, p 35 +# https://books.google.com/books?id=e60-AQAAIAAJ&pg=PA35 +# This Ordinance restored DST but with thirty minutes offset. +# +# Time Determination Ordinance (Cap. 264) +# The Laws of the Gold Coast, Vol. V (1954), p 380 +# https://books.google.com/books?id=Mqc-AQAAIAAJ&pg=PA380 +# Revised edition of the Time Determination Ordinance. +# +# Time Determination (Amendment) Ordinance, 1956 (No. 21 of 1956) [1956-08-29] +# Annual Volume of the Ordinances of the Gold Coast Enacted During the +# Year 1956, p 83 +# https://books.google.com/books?id=VLE-AQAAIAAJ&pg=PA83 +# This Ordinance abolished DST. + +Rule Ghana 1919 only - Nov 24 0:00 0:20 +0020 +Rule Ghana 1920 1942 - Jan 1 2:00 0 GMT +Rule Ghana 1920 1939 - Sep 1 2:00 0:20 +0020 +Rule Ghana 1940 1941 - May 1 2:00 0:20 +0020 +Rule Ghana 1950 1955 - Sep 1 2:00 0:30 +0030 +Rule Ghana 1951 1956 - Jan 1 2:00 0 GMT + +Zone Africa/Accra -0:00:52 - LMT 1915 Nov 2 + 0:00 Ghana %s 1942 Feb 8 + 0:30 - +0030 1946 Jan 6 + 0:00 Ghana %s # Ethiopia # From Paul Eggert (2014-07-31): @@ -101,14 +186,36 @@ Zone Africa/Bangui 1:14:20 - LMT 1912 1:00 - WAT -# Gambia +# The Gambia +# From P Chan (2020-12-09): +# Standard time of GMT-1 was adopted on 1933-04-01. On 1942-02-01, GMT was +# adopted as a war time measure. This was made permanent in 1946. +# +# Interpretation Ordinance, 1914 (No. 12 of 1914) [1914-09-29] +# Interpretation Ordinance, 1933 (No. 10 of 1933) [1933-03-31] +# Notice No. 5 of 1942, Colony of the Gambia Government Gazette, Vol. LIX, +# No.2, 1942-01-15, p 2 +# Interpretation (Amendment) Ordinance, 1946 (No. 3 of 1946) [1946-07-15] Zone Africa/Banjul -1:06:36 - LMT 1912 - -1:06:36 - BMT 1935 # Banjul Mean Time - -1:00 - -01 1964 + -1:06:36 - BMT 1933 Apr 1 # Banjul Mean Time + -1:00 - -01 1942 Feb 1 0:00 0:00 - GMT # Malawi -Zone Africa/Blantyre 2:20:00 - LMT 1903 Mar +# From P Chan (2020-12-09): +# In 1911, Zomba mean time was adopted as the legal time of Nyasaland. In +# 1914, Zomba mean time switched from GMT+2:21:10 to GMT+2:21. On 1925-07-01, +# GMT+2 was adopted. +# +# Interpretation and General Clauses Ordinance, 1911 (No. 12 of 1911) +# [1911-07-24] +# Notice No. 124 of 1914, 1914-06-30, The Nyasaland Government Gazette, Vol. +# XXI, No. 8, 1914-06-30, p 122 +# Interpretation and General Clauses (Amendment) Ordinance, 1925 (No. 3 of +# 1925) [1925-04-02] +Zone Africa/Blantyre 2:20:00 - LMT 1911 Jul 24 + 2:21:10 - ZMT 1914 Jun 30 # Zomba Mean Time + 2:21 - ZMT 1925 Jul 1 2:00 - CAT # Republic of the Congo @@ -145,19 +252,48 @@ Zone Africa/Douala 0:38:48 - LMT 1912 1:00 - WAT # Sierra Leone -# From Paul Eggert (2014-08-12): -# The following table is from Shanks & Pottenger, but it can't be right. -# Whitman gives Mar 31 - Aug 31 for 1931 on. -# The International Hydrographic Bulletin, 1932-33, p 63 says that -# Sierra Leone would advance its clocks by 20 minutes on 1933-10-01. -# Rule NAME FROM TO - IN ON AT SAVE LETTER/S -Rule SL 1935 1942 - Jun 1 0:00 0:40 -0020 -Rule SL 1935 1942 - Oct 1 0:00 0 -01 -Rule SL 1957 1962 - Jun 1 0:00 1:00 +01 -Rule SL 1957 1962 - Sep 1 0:00 0 GMT +# From P Chan (2020-12-09): +# Standard time of GMT-1 was adopted on 1913-07-01. Twenty minutes of DST was +# introduce[d] in 1932 and was suspended in 1939. In 1941, GMT was adopted by +# Defence Regulations. This was made permanent in 1946. +# +# Government Notice No. 121 of 1913, 1913-06-06, Sierra Leone Royal Gazette, +# Vol. XLIV, No. 1384, 1913-06-14, p 347 +# Alteration of Time Ordinance, 1932 (No. 34 of 1932) [1932-12-01] +# Alteration of Time (Amendment) Ordinance, 1938 (No. 25 of 1938) [1938-11-24] +# Defence Regulations (No. 9), 1939 (Regulations No. 9 of 1939), 1939-09-05 +# Defence Regulations (No. 11), 1939 (Regulations No. 11 of 1939), 1939-09-27 +# Defence (Amendment) (No. 17) Regulations, 1941 (Public Notice No. 157 of +# 1941), 1914-12-04 +# Alteration of Time (Amendment) Ordinance, 1946 (No. 2 of 1946) [1946-02-07] + +# From Tim Parenti (2021-03-02), per P Chan (2021-02-25): +# For Sierra Leone in 1957-1962, the standard time was defined in the +# Alteration of Time Ordinance, 1932 (as amended in 1946, renamed to Local Time +# Ordinance in 1960 and Local Time Act in 1961). It was unamended throughout +# that period. See references to "Time" in the Alphabetical Index of the +# Legislation in force on the 31st day of December, +# 1957: https://books.google.com/books?id=lvQ-AQAAIAAJ&pg=RA2-PA49 +# 1958: https://books.google.com/books?id=4fQ-AQAAIAAJ&pg=RA2-PA50 +# 1959: https://books.google.com/books?id=p_U-AQAAIAAJ&pg=RA2-PA55 +# 1960: https://books.google.com/books?id=JPY-AQAAIAAJ&pg=RA3-PA37 +# 1961: https://books.google.com/books?id=7vY-AQAAIAAJ&pg=RA3-PA41 +# 1962: https://books.google.com/books?id=W_c-AQAAIAAJ&pg=RA3-PA44 +# 1963: https://books.google.com/books?id=9vk-AQAAIAAJ&pg=RA1-PA47 +# +# Although Shanks & Pottenger had DST from Jun 1 00:00 to Sep 1 00:00 in this +# period, many contemporaneous almanacs agree that it wasn't used: +# https://mm.icann.org/pipermail/tz/2021-February/029866.html +# Go with the above. + +Rule SL 1932 only - Dec 1 0:00 0:20 -0040 +Rule SL 1933 1938 - Mar 31 24:00 0 -01 +Rule SL 1933 1939 - Aug 31 24:00 0:20 -0040 +Rule SL 1939 only - May 31 24:00 0 -01 Zone Africa/Freetown -0:53:00 - LMT 1882 - -0:53:00 - FMT 1913 Jun # Freetown Mean Time - -1:00 SL %s 1957 + -0:53:00 - FMT 1913 Jul 1 # Freetown MT + -1:00 SL %s 1939 Sep 5 + -1:00 - -01 1941 Dec 6 24:00 0:00 SL GMT/+01 # Botswana @@ -298,6 +434,85 @@ -4:30 - -0430 1965 -4:00 - AST +# Atikokan, Ontario + +# From Paul Eggert (1997-10-17): +# Mark Brader writes that an article in the 1997-10-14 Toronto Star +# says that Atikokan, Ontario currently does not observe DST, +# but will vote on 11-10 whether to use EST/EDT. +# He also writes that the Ontario Time Act (1990, Chapter T.9) +# http://www.gov.on.ca/MBS/english/publications/statregs/conttext.html +# says that Ontario east of 90W uses EST/EDT, and west of 90W uses CST/CDT. +# Officially Atikokan is therefore on CST/CDT, and most likely this report +# concerns a non-official time observed as a matter of local practice. +# +# From Paul Eggert (2000-10-02): +# Matthews and Vincent (1998) write that Atikokan, Pickle Lake, and +# New Osnaburgh observe CST all year, that Big Trout Lake observes +# CST/CDT, and that Upsala and Shebandowan observe EST/EDT, all in +# violation of the official Ontario rules. +# +# From Paul Eggert (2006-07-09): +# Chris Walton (2006-07-06) mentioned an article by Stephanie MacLellan in the +# 2005-07-21 Chronicle-Journal, which said: +# +# The clocks in Atikokan stay set on standard time year-round. +# This means they spend about half the time on central time and +# the other half on eastern time. +# +# For the most part, the system works, Mayor Dennis Brown said. +# +# "The majority of businesses in Atikokan deal more with Eastern +# Canada, but there are some that deal with Western Canada," he +# said. "I don't see any changes happening here." +# +# Walton also writes "Supposedly Pickle Lake and Mishkeegogamang +# [New Osnaburgh] follow the same practice." + +# From Garry McKinnon (2006-07-14) via Chris Walton: +# I chatted with a member of my board who has an outstanding memory +# and a long history in Atikokan (and in the telecom industry) and he +# can say for certain that Atikokan has been practicing the current +# time keeping since 1952, at least. + +# From Paul Eggert (2006-07-17): +# Shanks & Pottenger say that Atikokan has agreed with Rainy River +# ever since standard time was introduced, but the information from +# McKinnon sounds more authoritative. For now, assume that Atikokan +# switched to EST immediately after WWII era daylight saving time +# ended. This matches the old (less-populous) America/Coral_Harbour +# entry since our cutoff date of 1970, so we can move +# America/Coral_Harbour to the 'backward' file. + +Zone America/Atikokan -6:06:28 - LMT 1895 + -6:00 Canada C%sT 1940 Sep 29 + -6:00 1:00 CDT 1942 Feb 9 2:00s + -6:00 Canada C%sT 1945 Sep 30 2:00 + -5:00 - EST + +# Quebec east of Natashquan + +# From Paul Eggert (2021-05-09): +# H. David Matthews and Mary Vincent's map +# "It's about TIME", _Canadian Geographic_ (September-October 1998) +# http://www.canadiangeographic.ca/Magazine/SO98/alacarte.asp +# says that Quebec east of the -63 meridian is supposed to observe +# AST, but residents as far east as Natashquan use EST/EDT, and +# residents east of Natashquan use AST. +# The Quebec department of justice writes in +# "The situation in Minganie and Basse-Côte-Nord" +# https://www.justice.gouv.qc.ca/en/department/ministre/functions-and-responsabilities/legal-time-in-quebec/the-situation-in-minganie-and-basse-cote-nord/ +# that the coastal strip from just east of Natashquan to Blanc-Sablon +# observes Atlantic standard time all year round. +# This common practice was codified into law as of 2007; see Legal Time Act, +# CQLR c T-5.1 . +# For lack of better info, guess this practice began around 1970, contra to +# Shanks & Pottenger who have this region observing AST/ADT. + +Zone America/Blanc-Sablon -3:48:28 - LMT 1884 + -4:00 Canada A%sT 1970 + -4:00 - AST + # Cayman Is Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown -5:07:10 - KMT 1912 Feb # Kingston Mean Time @@ -318,6 +533,85 @@ -5:00 NT_YK E%sT 1946 -5:00 - EST +# From Chris Walton (2011-12-01): +# There are two areas within the Canadian province of British Columbia +# that do not currently observe daylight saving: +# a) The Creston Valley (includes the town of Creston and surrounding area) +# b) The eastern half of the Peace River Regional District +# (includes the cities of Dawson Creek and Fort St. John) + +# Earlier this year I stumbled across a detailed article about the time +# keeping history of Creston; it was written by Tammy Hardwick who is the +# manager of the Creston & District Museum. The article was written in May 2009. +# http://www.ilovecreston.com/?p=articles&t=spec&ar=260 +# According to the article, Creston has not changed its clocks since June 1918. +# i.e. Creston has been stuck on UT-7 for 93 years. +# Dawson Creek, on the other hand, changed its clocks as recently as April 1972. + +# Unfortunately the exact date for the time change in June 1918 remains +# unknown and will be difficult to ascertain. I e-mailed Tammy a few months +# ago to ask if Sunday June 2 was a reasonable guess. She said it was just +# as plausible as any other date (in June). She also said that after writing +# the article she had discovered another time change in 1916; this is the +# subject of another article which she wrote in October 2010. +# http://www.creston.museum.bc.ca/index.php?module=comments&uop=view_comment&cm+id=56 + +# Here is a summary of the three clock change events in Creston's history: +# 1. 1884 or 1885: adoption of Mountain Standard Time (GMT-7) +# Exact date unknown +# 2. Oct 1916: switch to Pacific Standard Time (GMT-8) +# Exact date in October unknown; Sunday October 1 is a reasonable guess. +# 3. June 1918: switch to Pacific Daylight Time (GMT-7) +# Exact date in June unknown; Sunday June 2 is a reasonable guess. +# note 1: +# On Oct 27/1918 when daylight saving ended in the rest of Canada, +# Creston did not change its clocks. +# note 2: +# During WWII when the Federal Government legislated a mandatory clock change, +# Creston did not oblige. +# note 3: +# There is no guarantee that Creston will remain on Mountain Standard Time +# (UTC-7) forever. +# The subject was debated at least once this year by the town Council. +# http://www.bclocalnews.com/kootenay_rockies/crestonvalleyadvance/news/116760809.html + +# During a period WWII, summer time (Daylight saying) was mandatory in Canada. +# In Creston, that was handled by shifting the area to PST (-8:00) then applying +# summer time to cause the offset to be -7:00, the same as it had been before +# the change. It can be argued that the timezone abbreviation during this +# period should be PDT rather than MST, but that doesn't seem important enough +# (to anyone) to further complicate the rules. + +# The transition dates (and times) are guesses. + +Zone America/Creston -7:46:04 - LMT 1884 + -7:00 - MST 1916 Oct 1 + -8:00 - PST 1918 Jun 2 + -7:00 - MST + +# Curaçao +# Milne gives 4:35:46.9 for Curaçao mean time; round to nearest. +# +# From Paul Eggert (2006-03-22): +# Shanks & Pottenger say that The Bottom and Philipsburg have been at +# -4:00 since standard time was introduced on 1912-03-02; and that +# Kralendijk and Rincon used Kralendijk Mean Time (-4:33:08) from +# 1912-02-02 to 1965-01-01. The former is dubious, since S&P also say +# Saba Island has been like Curaçao. +# This all predates our 1970 cutoff, though. +# +# By July 2007 Curaçao and St Maarten are planned to become +# associated states within the Netherlands, much like Aruba; +# Bonaire, Saba and St Eustatius would become directly part of the +# Netherlands as Kingdom Islands. This won't affect their time zones +# though, as far as we know. +# +Zone America/Curacao -4:35:47 - LMT 1912 Feb 12 # Willemstad + -4:30 - -0430 1965 + -4:00 - AST +Link America/Curacao America/Kralendijk +Link America/Curacao America/Lower_Princes + # Dominica Zone America/Dominica -4:05:36 - LMT 1911 Jul 1 0:01 # Roseau -4:00 - AST @@ -340,6 +634,7 @@ Zone America/Guadeloupe -4:06:08 - LMT 1911 Jun 8 # Pointe-à-Pitre -4:00 - AST + # Canada # # From Paul Eggert (2015-03-24): @@ -351,7 +646,6 @@ # Pottenger data. The post-1970 entries have been corrected, but the # pre-1970 entries are unchecked and probably have errors. # -# Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Mont 1917 only - Mar 25 2:00 1:00 D Rule Mont 1917 only - Apr 24 0:00 0 S Rule Mont 1919 only - Mar 31 2:30 1:00 D @@ -387,6 +681,48 @@ Zone America/Montserrat -4:08:52 - LMT 1911 Jul 1 0:01 # Cork Hill -4:00 - AST +# The Bahamas +# +# For 1899 Milne gives -5:09:29.5; round that. +# +# From P Chan (2020-11-27, corrected on 2020-12-02): +# There were two periods of DST observed in 1942-1945: 1942-05-01 +# midnight to 1944-12-31 midnight and 1945-02-01 to 1945-10-17 midnight. +# "midnight" should mean 24:00 from the context. +# +# War Time Order 1942 [1942-05-01] and War Time (No. 2) Order 1942 [1942-09-29] +# Appendix to the Statutes of 7 George VI. and the Year 1942. p 34, 43 +# https://books.google.com/books?id=5rlNAQAAIAAJ&pg=RA3-PA34 +# https://books.google.com/books?id=5rlNAQAAIAAJ&pg=RA3-PA43 +# +# War Time Order 1943 [1943-03-31] and War Time Order 1944 [1943-12-29] +# Appendix to the Statutes of 8 George VI. and the Year 1943. p 9-10, 28-29 +# https://books.google.com/books?id=5rlNAQAAIAAJ&pg=RA4-PA9 +# https://books.google.com/books?id=5rlNAQAAIAAJ&pg=RA4-PA28 +# +# War Time Order 1945 [1945-01-31] and the Order which revoke War Time Order +# 1945 [1945-10-16] Appendix to the Statutes of 9 George VI. and the Year +# 1945. p 160, 247-248 +# https://books.google.com/books?id=5rlNAQAAIAAJ&pg=RA6-PA160 +# https://books.google.com/books?id=5rlNAQAAIAAJ&pg=RA6-PA247 +# +# From Sue Williams (2006-12-07): +# The Bahamas announced about a month ago that they plan to change their DST +# rules to sync with the U.S. starting in 2007.... +# http://www.jonesbahamas.com/?c=45&a=10412 + +Rule Bahamas 1942 only - May 1 24:00 1:00 W +Rule Bahamas 1944 only - Dec 31 24:00 0 S +Rule Bahamas 1945 only - Feb 1 0:00 1:00 W +Rule Bahamas 1945 only - Aug 14 23:00u 1:00 P # Peace +Rule Bahamas 1945 only - Oct 17 24:00 0 S +Rule Bahamas 1964 1975 - Oct lastSun 2:00 0 S +Rule Bahamas 1964 1975 - Apr lastSun 2:00 1:00 D + +Zone America/Nassau -5:09:30 - LMT 1912 Mar 2 + -5:00 Bahamas E%sT 1976 + -5:00 US E%sT + # United States # # From Paul Eggert (2018-03-18): @@ -411,6 +747,13 @@ # https://cdnc.ucr.edu/cgi-bin/cdnc?a=d&d=DS19470110 # front page reports on end. +# Trinidad and Tobago +Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2 + -4:00 - AST +Link America/Port_of_Spain America/Marigot +Link America/Port_of_Spain America/St_Barthelemy +Link America/Port_of_Spain America/Virgin + # Argentina # This entry was intended for the following areas, but has been superseded by # more detailed zones. @@ -434,9 +777,10 @@ -4:04:00 - CMT 1912 # Castries Mean Time -4:00 - AST -# Virgin Is +# US Virgin Is Zone America/St_Thomas -4:19:44 - LMT 1911 Jul # Charlotte Amalie -4:00 - AST +Link America/St_Thomas America/Virgin # St Vincent and the Grenadines Zone America/St_Vincent -4:04:56 - LMT 1890 # Kingstown @@ -447,11 +791,36 @@ Zone America/Tortola -4:18:28 - LMT 1911 Jul # Road Town -4:00 - AST +# Dumont d'Urville, Île des Pétrels, -6640+14001, since 1956-11 +# (2005-12-05) +# +# Another base at Port-Martin, 50km east, began operation in 1947. +# It was destroyed by fire on 1952-01-14. +# +Zone Antarctica/DumontDUrville 0 - -00 1947 + 10:00 - +10 1952 Jan 14 + 0 - -00 1956 Nov + 10:00 - +10 + # McMurdo, Ross Island, since 1955-12 Zone Antarctica/McMurdo 0 - -00 1956 12:00 NZ NZ%sT Link Antarctica/McMurdo Antarctica/South_Pole +# Syowa, Antarctica +# +# From Hideyuki Suzuki (1999-02-06): +# In all Japanese stations, +0300 is used as the standard time. +# +# Syowa station, which is the first antarctic station of Japan, +# was established on 1957-01-29. Since Syowa station is still the main +# station of Japan, it's appropriate for the principal location. +Zone Antarctica/Syowa 0 - -00 1957 Jan 29 + 3:00 - +03 +# See: +# NIPR Antarctic Research Activities (1999-08-17) +# http://www.nipr.ac.jp/english/ara01.html + # Yemen # Milne says 2:59:54 was the meridian of the saluting battery at Aden, # and that Yemen was at 1:55:56, the meridian of the Hagia Sophia. @@ -711,6 +1080,8 @@ 1:00 - CET 1982 Nov 27 1:00 EU CE%sT + + # Moldova / Transnistria Zone Europe/Tiraspol 1:58:32 - LMT 1880 1:55 - CMT 1918 Feb 15 # Chisinau MT @@ -749,10 +1120,22 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou 3:00 - EAT -# US minor outlying islands +# Phoenix Islands, Kiribati +# From Paul Eggert (2021-05-27): +# Enderbury was inhabited 1860/1880s to mine guano, and 1938-03-06/1942-02-09 +# for aviation (ostensibly commercial, but military uses foreseen). +# The 19th-century dates are approximate. See Pacific/Kanton for +# the currently-inhabited representative for this timezone. +Zone Pacific/Enderbury 0 - -00 1860 + -11:24:20 - LMT 1885 + 0 - -00 1938 Mar 6 + -12:00 - -12 1942 Feb 9 + 0 - -00 + +# Johnston Zone Pacific/Johnston -10:00 - HST -# US minor outlying islands +# Midway # # From Mark Brader (2005-01-23): # [Fallacies and Fantasies of Air Transport History, by R.E.G. Davies, @@ -775,3 +1158,7 @@ 9:00 - +09 1969 Oct 10:00 - +10 2000 Dec 23 10:00 - ChST # Chamorro Standard Time + +# Local Variables: +# coding: utf-8 +# End: diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/checktab.awk r-cran-tzdb-0.2.0/inst/tzdata/checktab.awk --- r-cran-tzdb-0.1.2/inst/tzdata/checktab.awk 2019-06-22 20:55:46.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/checktab.awk 2021-10-26 18:57:08.000000000 +0000 @@ -58,11 +58,12 @@ zone_table, zone_NR >>"/dev/stderr" status = 1 } - split($1, cca, /,/) - cc = cca[1] + ccs = input_ccs[zone_NR] = $1 coordinates = $2 tz = $3 - comments = $4 + comments = input_comments[zone_NR] = $4 + split(ccs, cca, /,/) + cc = cca[1] # Don't complain about a special case for Crimea in zone.tab. # FIXME: zone.tab should be removed, since it is obsolete. @@ -77,12 +78,9 @@ cc0 = cc tz0 = tz tztab[tz] = 1 - tz2comments[tz] = comments tz2NR[tz] = zone_NR for (i in cca) { cc = cca[i] - cctz = cc tz - cctztab[cctz] = 1 if (cc2name[cc]) { cc_used[cc]++ } else { @@ -99,27 +97,27 @@ } } - for (cctz in cctztab) { - cc = substr (cctz, 1, 2) - tz = substr (cctz, 3) - if (1 < cc_used[cc]) { - comments_needed[tz] = cc - } - } - for (cctz in cctztab) { - cc = substr (cctz, 1, 2) - tz = substr (cctz, 3) - if (!comments_needed[tz] && tz2comments[tz]) { + for (i = 1; i <= zone_NR; i++) { + ccs = input_ccs[i] + if (!ccs) continue + comments = input_comments[i] + split(ccs, cca, /,/) + used_max = 0 + for (j in cca) { + cc = cca[j] + if (used_max < cc_used[cc]) { + used_max = cc_used[cc] + } + } + if (used_max <= 1 && comments) { printf "%s:%d: unnecessary comment '%s'\n", \ - zone_table, tz2NR[tz], tz2comments[tz] \ - >>"/dev/stderr" - tz2comments[tz] = 0 + zone_table, i, comments \ + >>"/dev/stderr" status = 1 - } else if (comments_needed[tz] && !tz2comments[tz]) { + } else if (1 < cc_used[cc] && !comments) { printf "%s:%d: missing comment for %s\n", \ - zone_table, tz2NR[tz], comments_needed[tz] \ + zone_table, i, cc \ >>"/dev/stderr" - tz2comments[tz] = 1 status = 1 } } @@ -149,8 +147,8 @@ ruleUsed[$2] = 1 if ($3 ~ /%/) rulePercentUsed[$2] = 1 } - if (tz && tz ~ /\//) { - if (!tztab[tz]) { + if (tz && tz ~ /\// && tz !~ /^Etc\//) { + if (!tztab[tz] && FILENAME != "backward") { printf "%s: no data for '%s'\n", zone_table, tz \ >>"/dev/stderr" status = 1 @@ -173,7 +171,7 @@ } } for (tz in tztab) { - if (!zoneSeen[tz]) { + if (!zoneSeen[tz] && tz !~ /^Etc\//) { printf "%s:%d: no Zone table for '%s'\n", \ zone_table, tz2NR[tz], tz >>"/dev/stderr" status = 1 diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/CONTRIBUTING r-cran-tzdb-0.2.0/inst/tzdata/CONTRIBUTING --- r-cran-tzdb-0.1.2/inst/tzdata/CONTRIBUTING 2018-10-05 20:04:58.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/CONTRIBUTING 2021-10-26 18:57:08.000000000 +0000 @@ -26,8 +26,11 @@ reliable sources as justification. Citations should use https: URLs if available. +For changes that fix sensitive security-related bugs, please see the +file SECURITY. + Please submit changes against either the latest release in - or the master branch of the development + or the main branch of the development repository. The latter is preferred. If you use Git the following workflow may be helpful: @@ -36,9 +39,9 @@ git clone https://github.com/eggert/tz.git cd tz - * Get current with the master branch. + * Get current with the main branch. - git checkout master + git checkout main git pull * Switch to a new branch for the changes. Choose a different @@ -70,17 +73,17 @@ * Create patch files 0001-*, 0002-*, ... - git format-patch master + git format-patch main * After reviewing the patch files, send the patches to tz@iana.org for others to review. - git send-email master + git send-email main For an archived example of such an email, see . - * Start anew by getting current with the master branch again + * Start anew by getting current with the main branch again (the second step above). Please do not create issues or pull requests on GitHub, as the diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/europe r-cran-tzdb-0.2.0/inst/tzdata/europe --- r-cran-tzdb-0.1.2/inst/tzdata/europe 2020-12-22 21:05:59.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/europe 2021-10-26 18:57:08.000000000 +0000 @@ -68,7 +68,6 @@ # 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 IST GMT Irish Standard (1968-) with winter DST # 1:00 CET CEST CEMT Central Europe @@ -822,7 +821,7 @@ # Shanks & Pottenger give 02:00, the BEV 00:00. Go with the BEV, # and guess 02:00 for 1945-04-12. -# From Alois Triendl (2019-07-22): +# From Alois Treindl (2019-07-22): # In 1946 the end of DST was on Monday, 7 October 1946, at 3:00 am. # Shanks had this right. Source: Die Weltpresse, 5. Oktober 1946, page 5. @@ -1736,19 +1735,22 @@ # advanced to sixty minutes later starting at hour two on 1944-04-02; ... # Starting at hour three on the date 1944-09-17 standard time will be resumed. # -# From Alois Triendl (2019-07-02): +# From Alois Treindl (2019-07-02): # I spent 6 Euros to buy two archive copies of Il Messaggero, a Roman paper, # for 1 and 2 April 1944. The edition of 2 April has this note: "Tonight at 2 # am, put forward the clock by one hour. Remember that in the night between # today and Monday the 'ora legale' will come in force again." That makes it # clear that in Rome the change was on Monday, 3 April 1944 at 2 am. # -# From Paul Eggert (2016-10-27): +# From Paul Eggert (2021-10-05): # Go with INRiM for DST rules, except as corrected by Inglis for 1944 # for the Kingdom of Italy. This is consistent with Renzo Baldini. # Model Rome's occupation by using C-Eur rules from 1943-09-10 # to 1944-06-04; although Rome was an open city during this period, it -# was effectively controlled by Germany. +# was effectively controlled by Germany. Using C-Eur is consistent +# with Treindl's comment about Rome in April 1944, as the "Rule Italy" +# lines during German occupation do not affect Europe/Rome +# (though they do affect Europe/Malta). # # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Italy 1916 only - Jun 3 24:00 1:00 S @@ -1800,6 +1802,10 @@ 1:00 Italy CE%sT 1980 1:00 EU CE%sT +# Kosovo +# See Europe/Belgrade. + + Link Europe/Rome Europe/Vatican Link Europe/Rome Europe/San_Marino @@ -2150,6 +2156,10 @@ # The data entries before 1945 are taken from # https://www.staff.science.uu.nl/~gent0113/wettijd/wettijd.htm +# From Paul Eggert (2021-05-09): +# I invented the abbreviations AMT for Amsterdam Mean Time and NST for +# Netherlands Summer Time, used in the Netherlands from 1835 to 1937. + # Rule NAME FROM TO - IN ON AT SAVE LETTER/S Rule Neth 1916 only - May 1 0:00 1:00 NST # Netherlands Summer Time Rule Neth 1916 only - Oct 1 0:00 0 AMT # Amsterdam Mean Time @@ -2376,12 +2386,10 @@ Rule Port 1944 1945 - Apr Sat>=21 22:00s 2:00 M Rule Port 1946 only - Apr Sat>=1 23:00s 1:00 S Rule Port 1946 only - Oct Sat>=1 23:00s 0 - -Rule Port 1947 1949 - Apr Sun>=1 2:00s 1:00 S -Rule Port 1947 1949 - Oct Sun>=1 2:00s 0 - -# Shanks & Pottenger say DST was observed in 1950; go with Whitman. +# Whitman says DST was not observed in 1950; go with Shanks & Pottenger. # Whitman gives Oct lastSun for 1952 on; go with Shanks & Pottenger. -Rule Port 1951 1965 - Apr Sun>=1 2:00s 1:00 S -Rule Port 1951 1965 - Oct Sun>=1 2:00s 0 - +Rule Port 1947 1965 - Apr Sun>=1 2:00s 1:00 S +Rule Port 1947 1965 - Oct Sun>=1 2:00s 0 - Rule Port 1977 only - Mar 27 0:00s 1:00 S Rule Port 1977 only - Sep 25 0:00s 0 - Rule Port 1978 1979 - Apr Sun>=1 0:00s 1:00 S @@ -2618,7 +2626,7 @@ # Although Shanks lists 1945-01-01 as the date for transition from # +01/+02 to +02/+03, more likely this is a placeholder. Guess that # the transition occurred at 1945-04-10 00:00, which is about when -# Königsberg surrendered to Soviet troops. (Thanks to Alois Triendl.) +# Königsberg surrendered to Soviet troops. (Thanks to Alois Treindl.) # From Paul Eggert (2016-03-18): # The 1989 transition is from USSR act No. 227 (1989-03-14). @@ -3683,6 +3691,9 @@ # # Source: The newspaper "Dagens Nyheter", 1916-10-01, page 7 upper left. +# An extra-special abbreviation style is SET for Swedish Time (svensk +# normaltid) 1879-1899, 3° west of the Stockholm Observatory. + # Zone NAME STDOFF RULES FORMAT [UNTIL] Zone Europe/Stockholm 1:12:12 - LMT 1879 Jan 1 1:00:14 - SET 1900 Jan 1 # Swedish Time diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/leapseconds r-cran-tzdb-0.2.0/inst/tzdata/leapseconds --- r-cran-tzdb-0.1.2/inst/tzdata/leapseconds 2021-01-09 18:59:03.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/leapseconds 2021-10-26 18:57:08.000000000 +0000 @@ -72,11 +72,11 @@ # Any additional leap seconds will come after this. # This Expires line is commented out for now, # so that pre-2020a zic implementations do not reject this file. -#Expires 2021 Dec 28 00:00:00 +#Expires 2022 Jun 28 00:00:00 # POSIX timestamps for the data in this file: #updated 1467936000 (2016-07-08 00:00:00 UTC) -#expires 1640649600 (2021-12-28 00:00:00 UTC) +#expires 1656374400 (2022-06-28 00:00:00 UTC) -# Updated through IERS Bulletin C61 -# File expires on: 28 December 2021 +# Updated through IERS Bulletin C62 +# File expires on: 28 June 2022 diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/leap-seconds.list r-cran-tzdb-0.2.0/inst/tzdata/leap-seconds.list --- r-cran-tzdb-0.1.2/inst/tzdata/leap-seconds.list 2021-01-09 18:59:02.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/leap-seconds.list 2021-10-26 18:57:08.000000000 +0000 @@ -204,10 +204,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C61 -# File expires on: 28 December 2021 +# Updated through IERS Bulletin C62 +# File expires on: 28 June 2022 # -#@ 3849638400 +#@ 3865363200 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -252,4 +252,4 @@ # the hash line is also ignored in the # computation. # -#h 2ab8253d d4380d28 75f01343 381504f8 8f8a4bfc +#h 599d45bf accd4b4f 8b60e46 49b623 7d13b825 diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/Makefile r-cran-tzdb-0.2.0/inst/tzdata/Makefile --- r-cran-tzdb-0.1.2/inst/tzdata/Makefile 2021-07-20 17:32:53.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/Makefile 2021-10-27 12:57:39.000000000 +0000 @@ -45,9 +45,9 @@ # # Any other value for POSIXRULES is obsolete and should not be relied on, as: # * It does not work correctly in popular implementations such as GNU/Linux. -# * It does not work in the tzdb implementation for timestamps after 2037. -# * It is incompatible with 'zic -b slim' if POSIXRULES specifies transitions -# at standard time or UT rather than at local time. +# * It does not work even in tzcode, except for historical timestamps +# that precede the last explicit transition in the POSIXRULES file. +# Hence it typically does not work for current and future timestamps. # In short, software should avoid ruleless settings like TZ='EET-2EEST' # and so should not depend on the value of POSIXRULES. # @@ -122,8 +122,8 @@ # Types to try, as an alternative to time_t. TIME_T_ALTERNATIVES = $(TIME_T_ALTERNATIVES_HEAD) $(TIME_T_ALTERNATIVES_TAIL) -TIME_T_ALTERNATIVES_HEAD = int64_t -TIME_T_ALTERNATIVES_TAIL = int32_t uint32_t uint64_t +TIME_T_ALTERNATIVES_HEAD = int_least64_t +TIME_T_ALTERNATIVES_TAIL = int_least32_t uint_least32_t uint_least64_t # What kind of TZif data files to generate. (TZif is the binary time # zone data format that zic generates; see Internet RFC 8536.) @@ -152,8 +152,10 @@ # The EXPIRES_LINE value matters only if REDO's value contains "right". # If you change EXPIRES_LINE, remove the leapseconds file before running "make". # zic's support for the Expires line was introduced in tzdb 2020a, -# and EXPIRES_LINE defaults to 0 for now so that the leapseconds file -# can be given to older zic implementations. +# and was modified in tzdb 2021b to generate version 4 TZif files. +# EXPIRES_LINE defaults to 0 for now so that the leapseconds file +# can be given to pre-2020a zic implementations and so that TZif files +# built by newer zic implementations can be read by pre-2021b libraries. EXPIRES_LINE= 0 # To install data in text form that has all the information of the TZif data, @@ -210,6 +212,7 @@ # -DHAVE_LOCALTIME_R=0 if your system lacks a localtime_r function # -DHAVE_LOCALTIME_RZ=0 if you do not want zdump to use localtime_rz # localtime_rz can make zdump significantly faster, but is nonstandard. +# -DHAVE_MALLOC_ERRNO=0 if malloc etc. do not set errno on failure. # -DHAVE_POSIX_DECLS=0 if your system's include files do not declare # functions like 'link' or variables like 'tzname' required by POSIX # -DHAVE_SNPRINTF=0 if your system lacks the snprintf function @@ -220,7 +223,6 @@ # -DHAVE_STRTOLL=0 if your system lacks the strtoll function # -DHAVE_SYMLINK=0 if your system lacks the symlink function # -DHAVE_SYS_STAT_H=0 if your compiler lacks a -# -DHAVE_SYS_WAIT_H=0 if your compiler lacks a # -DHAVE_TZSET=0 if your system lacks a tzset function # -DHAVE_UNISTD_H=0 if your compiler lacks a # -Dlocale_t=XXX if your system uses XXX instead of locale_t @@ -257,22 +259,26 @@ GCC_INSTRUMENT = \ -fsanitize=undefined -fsanitize-address-use-after-scope \ -fsanitize-undefined-trap-on-error -fstack-protector +# Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow. GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ $(GCC_INSTRUMENT) \ -Wall -Wextra \ -Walloc-size-larger-than=100000 -Warray-bounds=2 \ -Wbad-function-cast -Wcast-align=strict -Wdate-time \ -Wdeclaration-after-statement -Wdouble-promotion \ + -Wduplicated-branches -Wduplicated-cond \ -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \ - -Winit-self -Wjump-misses-init -Wlogical-op \ + -Winit-self -Wlogical-op \ -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ + -Wnull-dereference \ -Wold-style-definition -Woverlength-strings -Wpointer-arith \ - -Wshadow -Wshift-overflow=2 -Wstrict-prototypes -Wstringop-overflow=4 \ + -Wshadow -Wshift-overflow=2 -Wstrict-overflow \ + -Wstrict-prototypes -Wstringop-overflow=4 \ -Wstringop-truncation -Wsuggest-attribute=cold \ -Wsuggest-attribute=const -Wsuggest-attribute=format \ -Wsuggest-attribute=malloc \ -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ - -Wtrampolines -Wundef -Wuninitialized -Wunused \ + -Wtrampolines -Wundef -Wuninitialized -Wunused-macros \ -Wvariadic-macros -Wvla -Wwrite-strings \ -Wno-address -Wno-format-nonliteral -Wno-sign-compare \ -Wno-type-limits -Wno-unused-parameter @@ -498,7 +504,7 @@ tzfile.5.txt tzselect.8.txt zic.8.txt zdump.8.txt \ date.1.txt COMMON= calendars CONTRIBUTING LICENSE Makefile \ - NEWS README theory.html version + NEWS README SECURITY theory.html version WEB_PAGES= tz-art.html tz-how-to.html tz-link.html CHECK_WEB_PAGES=check_theory.html check_tz-art.html \ check_tz-how-to.html check_tz-link.html @@ -523,7 +529,7 @@ TZS_CUTOFF_FLAG= -c $(TZS_YEAR) TZS= to$(TZS_YEAR).tzs TZS_NEW= to$(TZS_YEAR)new.tzs -TZS_DEPS= $(PRIMARY_YDATA) asctime.c localtime.c \ +TZS_DEPS= $(YDATA) asctime.c localtime.c \ private.h tzfile.h zdump.c zic.c # EIGHT_YARDS is just a yard short of the whole ENCHILADA. EIGHT_YARDS = $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) tzdata.zi @@ -533,7 +539,7 @@ # This list is not the same as the output of 'git ls-files', since # .gitignore is not distributed. VERSION_DEPS= \ - calendars CONTRIBUTING LICENSE Makefile NEWS README \ + calendars CONTRIBUTING LICENSE Makefile NEWS README SECURITY \ africa antarctica asctime.c asia australasia \ backward backzone \ checklinks.awk checktab.awk \ @@ -757,7 +763,7 @@ sharp='#' && \ ! grep -Env $(SAFE_LINE) $(MANS) date.1 $(MANTXTS) \ $(MISC) $(SOURCES) $(WEB_PAGES) \ - CONTRIBUTING LICENSE README \ + CONTRIBUTING LICENSE README SECURITY \ version tzdata.zi && \ ! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \ Makefile && \ @@ -796,9 +802,10 @@ $(AWK) -f checklinks.awk tzdata.zi touch $@ -check_tables: checktab.awk $(PRIMARY_YDATA) $(ZONETABLES) +check_tables: checktab.awk $(YDATA) backward $(ZONETABLES) for tab in $(ZONETABLES); do \ - $(AWK) -f checktab.awk -v zone_table=$$tab $(PRIMARY_YDATA) \ + test "$$tab" = zone.tab && links='$(BACKWARD)' || links=''; \ + $(AWK) -f checktab.awk -v zone_table=$$tab $(YDATA) $$links \ || exit; \ done touch $@ @@ -952,6 +959,12 @@ public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ done public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) + : + : Also check 'backzone' syntax. + rm public.dir/main.zi + cd public.dir && $(MAKE) PACKRATDATA=backzone main.zi + public.dir/zic -d public.dir/zoneinfo main.zi + : rm -fr public.dir touch $@ @@ -964,7 +977,7 @@ mkdir $@.dir ln $(VERSION_DEPS) $@.dir case $@ in \ - int32_t) range=-2147483648,2147483648;; \ + int*32_t) range=-2147483648,2147483648;; \ u*) range=0,4294967296;; \ *) range=-4294967296,4294967296;; \ esac && \ diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/NEWS r-cran-tzdb-0.2.0/inst/tzdata/NEWS --- r-cran-tzdb-0.1.2/inst/tzdata/NEWS 2021-01-24 19:06:02.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/NEWS 2021-10-26 18:57:08.000000000 +0000 @@ -1,5 +1,291 @@ News for the tz database +Release 2021e - 2021-10-21 18:41:00 -0700 + + Changes to future timestamps + + Palestine will fall back 10-29 (not 10-30) at 01:00. + (Thanks to P Chan and Heba Hemad.) + + +Release 2021d - 2021-10-15 13:48:18 -0700 + + Briefly: + Fiji suspends DST for the 2021/2022 season. + 'zic -r' marks unspecified timestamps with "-00". + + Changes to future timestamps + + Fiji will suspend observance of DST for the 2021/2022 season. + Assume for now that it will return next year. (Thanks to Jashneel + Kumar and P Chan.) + + Changes to code + + 'zic -r' now uses "-00" time zone abbreviations for intervals + with UT offsets that are unspecified due to -r truncation. + This implements a change in draft Internet RFC 8536bis. + + +Release 2021c - 2021-10-01 14:21:49 -0700 + + Briefly: + Revert most 2021b changes to 'backward'. + Fix 'zic -b fat' bug in pre-1970 32-bit data. + Fix two Link line typos. + Distribute SECURITY file. + + This release is intended as a bugfix release, to fix compatibility + problems and typos reported since 2021b was released. + + Changes to Link directives + + Revert almost all of 2021b's changes to the 'backward' file, + by moving Link directives back to where they were in 2021a. + Although 'zic' doesn't care which source file contains a Link + directive, some downstream uses ran into trouble with the move. + (Problem reported by Stephen Colebourne for Joda-Time.) + + Fix typo that linked Atlantic/Jan_Mayen to the wrong location + (problem reported by Chris Walton). + + Fix 'backzone' typo that linked America/Virgin to the wrong + location (problem reported by Michael Deckers). + + Changes to code + + Fix a bug in 'zic -b fat' that caused old timestamps to be + mishandled in 32-bit-only readers (problem reported by Daniel + Fischer). + + Changes to documentation + + Distribute the SECURITY file (problem reported by Andreas Radke). + + +Release 2021b - 2021-09-24 16:23:00 -0700 + + Briefly: + Jordan now starts DST on February's last Thursday. + Samoa no longer observes DST. + Merge more location-based Zones whose timestamps agree since 1970. + Move some backward-compatibility links to 'backward'. + Rename Pacific/Enderbury to Pacific/Kanton. + Correct many pre-1993 transitions in Malawi, Portugal, etc. + zic now creates each output file or link atomically. + zic -L no longer omits the POSIX TZ string in its output. + zic fixes for truncation and leap second table expiration. + zic now follows POSIX for TZ strings using all-year DST. + Fix some localtime crashes and bugs in obscure cases. + zdump -v now outputs more-useful boundary cases. + tzfile.5 better matches a draft successor to RFC 8536. + A new file SECURITY. + + This release is prompted by recent announcements by Jordan and Samoa. + It incorporates many other changes that had accumulated since 2021a. + However, it omits most proposed changes that merged all Zones + agreeing since 1970, as concerns were raised about doing too many of + these changes at once. It does keeps some of these changes in the + interest of making tzdb more equitable one step at a time; see + "Merge more location-based Zones" below. + + Changes to future timestamps + + Jordan now starts DST on February's last Thursday. + (Thanks to Steffen Thorsen.) + + Samoa no longer observes DST. (Thanks to Geoffrey D. Bennett.) + + Changes to zone name + + Rename Pacific/Enderbury to Pacific/Kanton. When we added + Enderbury in 1993, we did not know that it is uninhabited and that + Kanton (population two dozen) is the only inhabited location in + that timezone. The old name is now a backward-compatility link. + + Changes to past timestamps + + Correct many pre-1993 transitions, fixing entries originally + derived from Shanks, Whitman, and Mundell. The fixes include: + - Barbados: standard time was introduced in 1911, not 1932; and + DST was observed in 1942-1944 + - Cook Islands: In 1899 they switched from east to west of GMT, + celebrating Christmas for two days. They (and Niue) switched + to standard time in 1952, not 1901. + - Guyana: corrected LMT for Georgetown; the introduction of + standard time in 1911, not 1915; and corrections to 1975 and + 1992 transitions + - Kanton: uninhabited before 1937-08-31 + - Niue: only observed -11:20 from 1952 through 1964, then went to + -11 instead of -11:30 + - Portugal: DST was observed in 1950 + - Tonga: corrected LMT; the introduction of standard time in 1945, + not 1901; and corrections to the transition from +12:20 to +13 + in 1961, not 1941 + Additional fixes to entries in the 'backzone' file include: + - Enderbury: inhabited only 1860/1885 and 1938-03-06/1942-02-09 + - The Gambia: 1933 and 1942 transitions + - Malawi: several 1911 through 1925 transitions + - Sierra Leone: several 1913 through 1941 transitions, and DST + was NOT observed in 1957 through 1962 + (Thanks to P Chan, Michael Deckers, Alexander Krivenyshev and + Alois Treindl.) + + Merge more location-based Zones whose timestamps agree since 1970, + as pre-1970 timestamps are out of scope. This is part of a + process that has been ongoing since 2013. This does not affect + post-1970 timestamps, and timezone historians who build with 'make + PACKRATDATA=backzone' should see no changes to pre-1970 timestamps. + When merging, keep the most-populous location's data, and move + data for other locations to 'backzone' with a backward + link in 'backward'. For example, move America/Creston data to + 'backzone' with a link in 'backward' from America/Phoenix because + the two timezones' timestamps agree since 1970; this change + affects some pre-1968 timestamps in America/Creston because + Creston and Phoenix disagreed before 1968. The affected Zones + are Africa/Accra, America/Atikokan, America/Blanc-Sablon, + America/Creston, America/Curacao, America/Nassau, + America/Port_of_Spain, Antarctica/DumontDUrville, and + Antarctica/Syowa. + + Changes to maintenance procedure + + The new file SECURITY covers how to report security-related bugs. + + Several backward-compatibility links have been moved to the + 'backward' file. These links, which range from Africa/Addis_Ababa + to Pacific/Saipan, are only for compatibility with now-obsolete + guidelines suggesting an entry for every ISO 3166 code. + The intercontinental convenience links Asia/Istanbul and + Europe/Nicosia have also been moved to 'backward'. + + Changes to code + + zic now creates each output file or link atomically, + possibly by creating a temporary file and then renaming it. + This avoids races where a TZ setting would temporarily stop + working while zic was installing a replacement file or link. + + zic -L no longer omits the POSIX TZ string in its output. + Starting with 2020a, zic -L truncated its output according to the + "Expires" directive or "#expires" comment in the leapseconds file. + The resulting TZif files omitted daylight saving transitions after + the leap second table expired, which led to far less-accurate + predictions of times after the expiry. Although future timestamps + cannot be converted accurately in the presence of leap seconds, it + is more accurate to convert near-future timestamps with a few + seconds error than with an hour error, so zic -L no longer + truncates output in this way. + + Instead, when zic -L is given the "Expires" directive, it now + outputs the expiration by appending a no-change entry to the leap + second table. Although this should work well with most TZif + readers, it does not conform to Internet RFC 8536 and some pickier + clients (including tzdb 2017c through 2021a) reject it, so + "Expires" directives are currently disabled by default. To enable + them, set the EXPIRES_LINE Makefile variable. If a TZif file uses + this new feature it is marked with a new TZif version number 4, + a format intended to be documented in a successor to RFC 8536. + + zic -L LEAPFILE -r @LO no longer generates an invalid TZif file + that omits leap second information for the range LO..B when LO + falls between two leap seconds A and B. Instead, it generates a + TZif version 4 file that represents the previously-missing + information. + + The TZif reader now allows the leap second table to begin with a + correction other than -1 or +1, and to contain adjacent + transitions with equal corrections. This supports TZif version 4. + + The TZif reader now lets leap seconds occur less than 28 days + apart. This supports possible future TZif extensions. + + Fix bug that caused 'localtime' etc. to crash when TZ was + set to a all-year DST string like "EST5EDT4,0/0,J365/25" that does + not conform to POSIX but does conform to Internet RFC 8536. + + Fix another bug that caused 'localtime' etc. to crash when TZ was + set to a POSIX-conforming but unusual TZ string like + "EST5EDT4,0/0,J365/0", where almost all the year is DST. + + Fix yet another bug that caused 'localtime' etc. to mishandle slim + TZif files containing leap seconds after the last explicit + transition in the table, or when handling far-future timestamps + in slim TZif files lacking leap seconds. + + Fix localtime misbehavior involving positive leap seconds. + This change affects only behavior for "right" system time, + which contains leap seconds, and only if the UT offset is + not a multiple of 60 seconds when a positive leap second occurs. + (No such timezone exists in tzdb, luckily.) Without the fix, + the timestamp was ambiguous during a positive leap second. + With the fix, any seconds occurring after a positive leap second + and within the same localtime minute are counted through 60, not + through 59; their UT offset (tm_gmtoff) is the same as before. + Here is how the fix affects timestamps in a timezone with UT + offset +01:23:45 (5025 seconds) and with a positive leap second at + 1972-06-30 23:59:60 UTC (78796800): + + time_t without the fix with the fix + 78796800 1972-07-01 01:23:45 1972-07-01 01:23:45 (leap second) + 78796801 1972-07-01 01:23:45 1972-07-01 01:23:46 + ... + 78796815 1972-07-01 01:23:59 1972-07-01 01:23:60 + 78796816 1972-07-01 01:24:00 1972-07-01 01:24:00 + + Fix an unlikely bug that caused 'localtime' etc. to misbehave if + civil time changes a few seconds before time_t wraps around, when + leap seconds are enabled. + + Fix bug in zic -r; in some cases, the dummy time type after the + last time transition disagreed with the TZ string, contrary to + Internet RFC 8563 section 3.3. + + Fix a bug with 'zic -r @X' when X is a negative leap second that + has a nonnegative correction. Without the fix, the output file + was truncated so that X appeared to be a positive leap second. + Fix a similar, even-less-likely bug when truncating at a positive + leap second that has a nonpositive correction. + + zic -r now reports an error if given rolling leap seconds, as this + usage has never generally worked and is evidently unused. + + zic now generates a POSIX-conforming TZ string for TZif files + where all-year DST is predicted for the indefinite future. + For example, for all-year Eastern Daylight Time, zic now generates + "XXX3EDT4,0/0,J365/23" where it previously generated + "EST5EDT,0/0,J365/25" or "". (Thanks to Michael Deckers for + noting the possibility of POSIX conformance.) + + zic.c no longer requires sys/wait.h (thanks to spazmodius for + noting it wasn't needed). + + When reading slim TZif files, zdump no longer mishandles leap + seconds on the rare platforms where time_t counts leap seconds, + fixing a bug introduced in 2014g. + + zdump -v now outputs timestamps at boundaries of what localtime + and gmtime can represent, instead of the less-useful timestamps + one day after the minimum and one day before the maximum. + (Thanks to Arthur David Olson for prototype code, and to Manuela + Friedrich for debugging help.) + + zdump's -c and -t options are now consistently inclusive for the + lower time bound and exclusive for the upper. Formerly they were + inconsistent. (Confusion noted by Martin Burnicki.) + + Changes to build procedure + + You can now compile with -DHAVE_MALLOC_ERRNO=0 to port to + non-POSIX hosts where malloc doesn't set errno. + (Problem reported by Jan Engelhardt.) + + Changes to documentation + + tzfile.5 better matches a draft successor to RFC 8536 + . + + Release 2021a - 2021-01-24 10:54:57 -0800 Changes to future timestamps @@ -31,7 +317,7 @@ Correct many pre-1986 transitions, fixing entries originally derived from Shanks. The fixes include: - Australia: several 1917 through 1971 transitions - - Bahamas: several 1941 through 1945 transitions + - The Bahamas: several 1941 through 1945 transitions - Bermuda: several 1917 through 1956 transitions - Belize: several 1942 through 1968 transitions - Ghana: several 1915 through 1956 transitions @@ -287,13 +573,13 @@ probably wrong.) Fix several errors in pre-1970 transitions in Perry County, IN. - (Thanks to Alois Triendl for pointing out the 1967/9 errors.) + (Thanks to Alois Treindl for pointing out the 1967/9 errors.) Edmonton did not observe DST in 1967 or 1969. In 1946 Vancouver ended DST on 09-29 not 10-13, and Vienna ended DST on 10-07 not 10-06. In 1945 Königsberg (now Kaliningrad) switched from +01/+02 to +02/+03 on 04-10 not 01-01, and its +02/+03 is abbreviated - EET/EEST, not CET/CEST. (Thanks to Alois Triendl.) In 1946 + EET/EEST, not CET/CEST. (Thanks to Alois Treindl.) In 1946 Königsberg switched to +03 on 04-07 not 01-01. In 1946 Louisville switched from CST to CDT on 04-28 at 00:01, not @@ -825,8 +1111,8 @@ Institute in Montevideo. (Thanks to Jeremie Bonjour, Tim Parenti, and Michael Deckers.) - Enderbury and Kiritimati skipped New Year's Eve 1994, not - New Year's Day 1995. (Thanks to Kerry Shetline.) + East Kiribati skipped New Year's Eve 1994, not New Year's Day 1995. + (Thanks to Kerry Shetline.) Fix the 1912-01-01 transition for Portugal and its colonies. This transition was at 00:00 according to the new UT offset, not diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/northamerica r-cran-tzdb-0.2.0/inst/tzdata/northamerica --- r-cran-tzdb-0.1.2/inst/tzdata/northamerica 2020-12-05 18:39:09.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/northamerica 2021-10-26 18:57:08.000000000 +0000 @@ -729,7 +729,11 @@ -11:00 US B%sT 1983 Oct 30 2:00 -10:00 US AH%sT 1983 Nov 30 -10:00 US H%sT -# The following switches don't quite make our 1970 cutoff. +# The following switches don't make our 1970 cutoff. +# +# Kiska observed Tokyo date and time during Japanese occupation from +# 1942-06-06 to 1943-07-29, and similarly for Attu from 1942-06-07 to +# 1943-05-29 (all dates American). Both islands are now uninhabited. # # Shanks writes that part of southwest Alaska (e.g. Aniak) # switched from -11:00 to -10:00 on 1968-09-22 at 02:00, @@ -825,6 +829,8 @@ -7:00 - MST 1967 -7:00 US M%sT 1968 Mar 21 -7:00 - MST +Link America/Phoenix America/Creston + # From Arthur David Olson (1988-02-13): # A writer from the Inter Tribal Council of Arizona, Inc., # notes in private correspondence dated 1987-12-28 that "Presently, only the @@ -970,7 +976,7 @@ -5:00 US E%sT # # Perry County, Indiana, switched from eastern to central time in April 2006. -# From Alois Triendl (2019-07-09): +# From Alois Treindl (2019-07-09): # The Indianapolis News, Friday 27 October 1967 states that Perry County # returned to CST. It went again to EST on 27 April 1969, as documented by the # Indianapolis star of Saturday 26 April. @@ -1593,24 +1599,7 @@ # From Paul Eggert (2020-01-10): # See America/Toronto for most of Quebec, including Montreal. # See America/Halifax for the Îles de la Madeleine and the Listuguj reserve. -# -# Matthews and Vincent (1998) also write that Quebec east of the -63 -# meridian is supposed to observe AST, but residents as far east as -# Natashquan use EST/EDT, and residents east of Natashquan use AST. -# The Quebec department of justice writes in -# "The situation in Minganie and Basse-Côte-Nord" -# https://www.justice.gouv.qc.ca/en/department/ministre/functions-and-responsabilities/legal-time-in-quebec/the-situation-in-minganie-and-basse-cote-nord/ -# that the coastal strip from just east of Natashquan to Blanc-Sablon -# observes Atlantic standard time all year round. -# This common practice was codified into law as of 2007; see Legal Time Act, -# CQLR c T-5.1 . -# For lack of better info, guess this practice began around 1970, contra to -# Shanks & Pottenger who have this region observing AST/ADT. - -# Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone America/Blanc-Sablon -3:48:28 - LMT 1884 - -4:00 Canada A%sT 1970 - -4:00 - AST +# See America/Puerto_Rico for east of Natashquan. # Ontario @@ -1649,54 +1638,6 @@ # time became a comic failure in Orillia. Toronto Star 2017-07-08. # https://www.thestar.com/news/insight/2017/07/08/bold-attempt-at-daylight-saving-time-became-a-comic-failure-in-orillia.html -# From Paul Eggert (1997-10-17): -# Mark Brader writes that an article in the 1997-10-14 Toronto Star -# says that Atikokan, Ontario currently does not observe DST, -# but will vote on 11-10 whether to use EST/EDT. -# He also writes that the Ontario Time Act (1990, Chapter T.9) -# http://www.gov.on.ca/MBS/english/publications/statregs/conttext.html -# says that Ontario east of 90W uses EST/EDT, and west of 90W uses CST/CDT. -# Officially Atikokan is therefore on CST/CDT, and most likely this report -# concerns a non-official time observed as a matter of local practice. -# -# From Paul Eggert (2000-10-02): -# Matthews and Vincent (1998) write that Atikokan, Pickle Lake, and -# New Osnaburgh observe CST all year, that Big Trout Lake observes -# CST/CDT, and that Upsala and Shebandowan observe EST/EDT, all in -# violation of the official Ontario rules. -# -# From Paul Eggert (2006-07-09): -# Chris Walton (2006-07-06) mentioned an article by Stephanie MacLellan in the -# 2005-07-21 Chronicle-Journal, which said: -# -# The clocks in Atikokan stay set on standard time year-round. -# This means they spend about half the time on central time and -# the other half on eastern time. -# -# For the most part, the system works, Mayor Dennis Brown said. -# -# "The majority of businesses in Atikokan deal more with Eastern -# Canada, but there are some that deal with Western Canada," he -# said. "I don't see any changes happening here." -# -# Walton also writes "Supposedly Pickle Lake and Mishkeegogamang -# [New Osnaburgh] follow the same practice." - -# From Garry McKinnon (2006-07-14) via Chris Walton: -# I chatted with a member of my board who has an outstanding memory -# and a long history in Atikokan (and in the telecom industry) and he -# can say for certain that Atikokan has been practicing the current -# time keeping since 1952, at least. - -# From Paul Eggert (2006-07-17): -# Shanks & Pottenger say that Atikokan has agreed with Rainy River -# ever since standard time was introduced, but the information from -# McKinnon sounds more authoritative. For now, assume that Atikokan -# switched to EST immediately after WWII era daylight saving time -# ended. This matches the old (less-populous) America/Coral_Harbour -# entry since our cutoff date of 1970, so we can move -# America/Coral_Harbour to the 'backward' file. - # From Mark Brader (2010-03-06): # # Currently the database has: @@ -1827,6 +1768,7 @@ -5:00 Canada E%sT 1946 -5:00 Toronto E%sT 1974 -5:00 Canada E%sT +Link America/Toronto America/Nassau Zone America/Thunder_Bay -5:57:00 - LMT 1895 -6:00 - CST 1910 -5:00 - EST 1942 @@ -1842,11 +1784,7 @@ -6:00 Canada C%sT 1940 Sep 29 -6:00 1:00 CDT 1942 Feb 9 2:00s -6:00 Canada C%sT -Zone America/Atikokan -6:06:28 - LMT 1895 - -6:00 Canada C%sT 1940 Sep 29 - -6:00 1:00 CDT 1942 Feb 9 2:00s - -6:00 Canada C%sT 1945 Sep 30 2:00 - -5:00 - EST +# For Atikokan see America/Panama. # Manitoba @@ -1998,7 +1936,7 @@ # Alberta -# From Alois Triendl (2019-07-19): +# From Alois Treindl (2019-07-19): # There was no DST in Alberta in 1967... Calgary Herald, 29 April 1967. # 1969, no DST, from Edmonton Journal 18 April 1969 # @@ -2037,60 +1975,6 @@ # Shanks & Pottenger write that since 1970 most of this region has # been like Vancouver. # Dawson Creek uses MST. Much of east BC is like Edmonton. -# Matthews and Vincent (1998) write that Creston is like Dawson Creek. - -# It seems though that (re: Creston) is not entirely correct: - -# From Chris Walton (2011-12-01): -# There are two areas within the Canadian province of British Columbia -# that do not currently observe daylight saving: -# a) The Creston Valley (includes the town of Creston and surrounding area) -# b) The eastern half of the Peace River Regional District -# (includes the cities of Dawson Creek and Fort St. John) - -# Earlier this year I stumbled across a detailed article about the time -# keeping history of Creston; it was written by Tammy Hardwick who is the -# manager of the Creston & District Museum. The article was written in May 2009. -# http://www.ilovecreston.com/?p=articles&t=spec&ar=260 -# According to the article, Creston has not changed its clocks since June 1918. -# i.e. Creston has been stuck on UT-7 for 93 years. -# Dawson Creek, on the other hand, changed its clocks as recently as April 1972. - -# Unfortunately the exact date for the time change in June 1918 remains -# unknown and will be difficult to ascertain. I e-mailed Tammy a few months -# ago to ask if Sunday June 2 was a reasonable guess. She said it was just -# as plausible as any other date (in June). She also said that after writing -# the article she had discovered another time change in 1916; this is the -# subject of another article which she wrote in October 2010. -# http://www.creston.museum.bc.ca/index.php?module=comments&uop=view_comment&cm+id=56 - -# Here is a summary of the three clock change events in Creston's history: -# 1. 1884 or 1885: adoption of Mountain Standard Time (GMT-7) -# Exact date unknown -# 2. Oct 1916: switch to Pacific Standard Time (GMT-8) -# Exact date in October unknown; Sunday October 1 is a reasonable guess. -# 3. June 1918: switch to Pacific Daylight Time (GMT-7) -# Exact date in June unknown; Sunday June 2 is a reasonable guess. -# note 1: -# On Oct 27/1918 when daylight saving ended in the rest of Canada, -# Creston did not change its clocks. -# note 2: -# During WWII when the Federal Government legislated a mandatory clock change, -# Creston did not oblige. -# note 3: -# There is no guarantee that Creston will remain on Mountain Standard Time -# (UTC-7) forever. -# The subject was debated at least once this year by the town Council. -# http://www.bclocalnews.com/kootenay_rockies/crestonvalleyadvance/news/116760809.html - -# During a period WWII, summer time (Daylight saying) was mandatory in Canada. -# In Creston, that was handled by shifting the area to PST (-8:00) then applying -# summer time to cause the offset to be -7:00, the same as it had been before -# the change. It can be argued that the timezone abbreviation during this -# period should be PDT rather than MST, but that doesn't seem important enough -# (to anyone) to further complicate the rules. - -# The transition dates (and times) are guesses. # From Matt Johnson (2015-09-21): # Fort Nelson, BC, Canada will cancel DST this year. So while previously they @@ -2107,7 +1991,7 @@ # # From Paul Eggert (2019-07-25): # Shanks says Fort Nelson did not observe DST in 1946, unlike Vancouver. -# Alois Triendl confirmed this on 07-22, citing the 1946-04-27 Vancouver Daily +# Alois Treindl confirmed this on 07-22, citing the 1946-04-27 Vancouver Daily # Province. He also cited the 1946-09-28 Victoria Daily Times, which said # that Vancouver, Victoria, etc. "change at midnight Saturday"; for now, # guess they meant 02:00 Sunday since 02:00 was common practice in Vancouver. @@ -2144,10 +2028,7 @@ -8:00 Vanc P%sT 1987 -8:00 Canada P%sT 2015 Mar 8 2:00 -7:00 - MST -Zone America/Creston -7:46:04 - LMT 1884 - -7:00 - MST 1916 Oct 1 - -8:00 - PST 1918 Jun 2 - -7:00 - MST +# For Creston see America/Phoenix. # Northwest Territories, Nunavut, Yukon @@ -2929,64 +2810,61 @@ # Anguilla # Antigua and Barbuda -# See America/Port_of_Spain. +# See America/Puerto_Rico. + +# The Bahamas +# See America/Toronto. -# Bahamas -# -# For 1899 Milne gives -5:09:29.5; round that. -# -# From P Chan (2020-11-27, corrected on 2020-12-02): -# There were two periods of DST observed in 1942-1945: 1942-05-01 -# midnight to 1944-12-31 midnight and 1945-02-01 to 1945-10-17 midnight. -# "midnight" should mean 24:00 from the context. -# -# War Time Order 1942 [1942-05-01] and War Time (No. 2) Order 1942 [1942-09-29] -# Appendix to the Statutes of 7 George VI. and the Year 1942. p 34, 43 -# https://books.google.com/books?id=5rlNAQAAIAAJ&pg=RA3-PA34 -# https://books.google.com/books?id=5rlNAQAAIAAJ&pg=RA3-PA43 -# -# War Time Order 1943 [1943-03-31] and War Time Order 1944 [1943-12-29] -# Appendix to the Statutes of 8 George VI. and the Year 1943. p 9-10, 28-29 -# https://books.google.com/books?id=5rlNAQAAIAAJ&pg=RA4-PA9 -# https://books.google.com/books?id=5rlNAQAAIAAJ&pg=RA4-PA28 -# -# War Time Order 1945 [1945-01-31] and the Order which revoke War Time Order -# 1945 [1945-10-16] Appendix to the Statutes of 9 George VI. and the Year -# 1945. p 160, 247-248 -# https://books.google.com/books?id=5rlNAQAAIAAJ&pg=RA6-PA160 -# https://books.google.com/books?id=5rlNAQAAIAAJ&pg=RA6-PA247 -# -# From Sue Williams (2006-12-07): -# The Bahamas announced about a month ago that they plan to change their DST -# rules to sync with the U.S. starting in 2007.... -# http://www.jonesbahamas.com/?c=45&a=10412 - -# Rule NAME FROM TO - IN ON AT SAVE LETTER/S -Rule Bahamas 1942 only - May 1 24:00 1:00 W -Rule Bahamas 1944 only - Dec 31 24:00 0 S -Rule Bahamas 1945 only - Feb 1 0:00 1:00 W -Rule Bahamas 1945 only - Aug 14 23:00u 1:00 P # Peace -Rule Bahamas 1945 only - Oct 17 24:00 0 S -Rule Bahamas 1964 1975 - Oct lastSun 2:00 0 S -Rule Bahamas 1964 1975 - Apr lastSun 2:00 1:00 D -# Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone America/Nassau -5:09:30 - LMT 1912 Mar 2 - -5:00 Bahamas E%sT 1976 - -5:00 US E%sT # Barbados # For 1899 Milne gives -3:58:29.2; round that. -# Rule NAME FROM TO - IN ON AT SAVE LETTER/S +# From P Chan (2020-12-09 and 2020-12-11): +# Standard time of GMT-4 was adopted in 1911. +# Definition of Time Act, 1911 (1911-7) [1911-08-28] +# 1912, Laws of Barbados (5 v.), OCLC Number: 919801291, Vol. 4, Image No. 522 +# 1944, Laws of Barbados (5 v.), OCLC Number: 84548697, Vol. 4, Image No. 122 +# http://llmc.com/browse.aspx?type=2&coll=85&div=297 +# +# DST was observed in 1942-44. +# Defence (Daylight Saving) Regulations, 1942, 1942-04-13 +# Defence (Daylight Saving) (Repeal) Regulations, 1942, 1942-08-22 +# Defence (Daylight Saving) Regulations, 1943, 1943-04-16 +# Defence (Daylight Saving) (Repeal) Regulations, 1943, 1943-09-01 +# Defence (Daylight Saving) Regulations, 1944, 1944-03-21 +# [Defence (Daylight Saving) (Amendment) Regulations 1944, 1944-03-28] +# Defence (Daylight Saving) (Repeal) Regulations, 1944, 1944-08-30 +# +# 1914-, Subsidiary Legis., Annual Vols. OCLC Number: 226290591 +# 1942: Image Nos. 527-528, 555-556 +# 1943: Image Nos. 178-179, 198 +# 1944: Image Nos. 113-115, 129 +# http://llmc.com/titledescfull.aspx?type=2&coll=85&div=297&set=98437 +# +# From Tim Parenti (2021-02-20): +# The transitions below are derived from P Chan's sources, except that the 1977 +# through 1980 transitions are from Shanks & Pottenger since we have no better +# data there. Of particular note, the 1944 DST regulation only advanced the +# time to "exactly three and a half hours later than Greenwich mean time", as +# opposed to "three hours" in the 1942 and 1943 regulations. + +# Rule NAME FROM TO - IN ON AT SAVE LETTER/S +Rule Barb 1942 only - Apr 19 5:00u 1:00 D +Rule Barb 1942 only - Aug 31 6:00u 0 S +Rule Barb 1943 only - May 2 5:00u 1:00 D +Rule Barb 1943 only - Sep 5 6:00u 0 S +Rule Barb 1944 only - Apr 10 5:00u 0:30 - +Rule Barb 1944 only - Sep 10 6:00u 0 S Rule Barb 1977 only - Jun 12 2:00 1:00 D Rule Barb 1977 1978 - Oct Sun>=1 2:00 0 S Rule Barb 1978 1980 - Apr Sun>=15 2:00 1:00 D Rule Barb 1979 only - Sep 30 2:00 0 S Rule Barb 1980 only - Sep 25 2:00 0 S # Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone America/Barbados -3:58:29 - LMT 1924 # Bridgetown - -3:58:29 - BMT 1932 # Bridgetown Mean Time +Zone America/Barbados -3:58:29 - LMT 1911 Aug 28 # Bridgetown + -4:00 Barb A%sT 1944 + -4:00 Barb AST/-0330 1945 -4:00 Barb A%sT # Belize @@ -3148,6 +3026,9 @@ -4:00 Canada A%sT 1976 -4:00 US A%sT +# Caribbean Netherlands +# See America/Puerto_Rico. + # Cayman Is # See America/Panama. @@ -3376,7 +3257,7 @@ -5:00 Cuba C%sT # Dominica -# See America/Port_of_Spain. +# See America/Puerto_Rico. # Dominican Republic @@ -3428,7 +3309,7 @@ # Guadeloupe # St Barthélemy # St Martin (French part) -# See America/Port_of_Spain. +# See America/Puerto_Rico. # Guatemala # @@ -3615,7 +3496,7 @@ -4:00 - AST # Montserrat -# See America/Port_of_Spain. +# See America/Puerto_Rico. # Nicaragua # @@ -3687,6 +3568,7 @@ Zone America/Panama -5:18:08 - LMT 1890 -5:19:36 - CMT 1908 Apr 22 # Colón Mean Time -5:00 - EST +Link America/Panama America/Atikokan Link America/Panama America/Cayman # Puerto Rico @@ -3696,10 +3578,29 @@ -4:00 - AST 1942 May 3 -4:00 US A%sT 1946 -4:00 - AST +Link America/Puerto_Rico America/Anguilla +Link America/Puerto_Rico America/Antigua +Link America/Puerto_Rico America/Aruba +Link America/Puerto_Rico America/Curacao +Link America/Puerto_Rico America/Blanc-Sablon # Quebec (Lower North Shore) +Link America/Puerto_Rico America/Dominica +Link America/Puerto_Rico America/Grenada +Link America/Puerto_Rico America/Guadeloupe +Link America/Puerto_Rico America/Kralendijk # Caribbean Netherlands +Link America/Puerto_Rico America/Lower_Princes # Sint Maarten +Link America/Puerto_Rico America/Marigot # St Martin (French part) +Link America/Puerto_Rico America/Montserrat +Link America/Puerto_Rico America/Port_of_Spain # Trinidad & Tobago +Link America/Puerto_Rico America/St_Barthelemy # St Barthélemy +Link America/Puerto_Rico America/St_Kitts # St Kitts & Nevis +Link America/Puerto_Rico America/St_Lucia +Link America/Puerto_Rico America/St_Thomas # Virgin Islands (US) +Link America/Puerto_Rico America/St_Vincent +Link America/Puerto_Rico America/Tortola # Virgin Islands (UK) # St Kitts-Nevis # St Lucia -# See America/Port_of_Spain. +# See America/Puerto_Rico. # St Pierre and Miquelon # There are too many St Pierres elsewhere, so we'll use 'Miquelon'. @@ -3710,7 +3611,10 @@ -3:00 Canada -03/-02 # St Vincent and the Grenadines -# See America/Port_of_Spain. +# See America/Puerto_Rico. + +# Sint Maarten +# See America/Puerto_Rico. # Turks and Caicos # @@ -3781,8 +3685,8 @@ -5:00 US E%sT # British Virgin Is -# Virgin Is -# See America/Port_of_Spain. +# US Virgin Is +# See America/Puerto_Rico. # Local Variables: diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/SECURITY r-cran-tzdb-0.2.0/inst/tzdata/SECURITY --- r-cran-tzdb-0.1.2/inst/tzdata/SECURITY 1970-01-01 00:00:00.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/SECURITY 2021-10-26 18:57:08.000000000 +0000 @@ -0,0 +1,15 @@ +Please report any sensitive security-related bugs via email to the +tzdb designated coordinators, currently Paul Eggert + and Tim Parenti . +Put "tzdb security" at the start of your email's subject line. +We prefer communications to be in English. + +You should receive a response within a week. If not, please follow up +via email to make sure we received your original message. + +If we confirm the bug, we plan to notify affected third-party services +or software that we know about, prepare an advisory, commit fixes to +the main development branch as quickly as is practical, and finally +publish the advisory on tz@iana.org. As with all tzdb contributions, +we give credit to security contributors unless they wish to remain +anonymous. diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/southamerica r-cran-tzdb-0.2.0/inst/tzdata/southamerica --- r-cran-tzdb-0.1.2/inst/tzdata/southamerica 2020-10-03 22:07:12.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/southamerica 2021-10-26 18:57:08.000000000 +0000 @@ -574,7 +574,7 @@ -3:00 - -03 # Aruba -Link America/Curacao America/Aruba +# See America/Puerto_Rico. # Bolivia # Zone NAME STDOFF RULES FORMAT [UNTIL] @@ -1369,35 +1369,14 @@ # no information; probably like America/Bogota # Curaçao - -# Milne gives 4:35:46.9 for Curaçao mean time; round to nearest. -# -# From Paul Eggert (2006-03-22): -# Shanks & Pottenger say that The Bottom and Philipsburg have been at -# -4:00 since standard time was introduced on 1912-03-02; and that -# Kralendijk and Rincon used Kralendijk Mean Time (-4:33:08) from -# 1912-02-02 to 1965-01-01. The former is dubious, since S&P also say -# Saba Island has been like Curaçao. -# This all predates our 1970 cutoff, though. -# -# By July 2007 Curaçao and St Maarten are planned to become -# associated states within the Netherlands, much like Aruba; -# Bonaire, Saba and St Eustatius would become directly part of the -# Netherlands as Kingdom Islands. This won't affect their time zones -# though, as far as we know. +# See America/Puerto_Rico. # -# Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone America/Curacao -4:35:47 - LMT 1912 Feb 12 # Willemstad - -4:30 - -0430 1965 - -4:00 - AST - # From Arthur David Olson (2011-06-15): # use links for places with new iso3166 codes. # The name "Lower Prince's Quarter" is both longer than fourteen characters -# and contains an apostrophe; use "Lower_Princes" below. - -Link America/Curacao America/Lower_Princes # Sint Maarten -Link America/Curacao America/Kralendijk # Caribbean Netherlands +# and contains an apostrophe; use "Lower_Princes".... +# From Paul Eggert (2021-09-29): +# These backward-compatibility links now are in the 'northamerica' file. # Ecuador # @@ -1540,11 +1519,40 @@ -3:00 - -03 # Guyana + +# From P Chan (2020-11-27): +# https://books.google.com/books?id=5-5CAQAAMAAJ&pg=SA1-PA547 +# The Official Gazette of British Guiana. (New Series.) Vol. XL. July to +# December, 1915, p 1547, lists as several notes: +# "Local Mean Time 3 hours 52 mins. 39 secs. slow of Greenwich Mean Time +# (Georgetown.) From 1st August, 1911, British Guiana Standard Mean Time 4 +# hours slow of Greenwich Mean Time, by notice in Official Gazette on 1st July, +# 1911. From 1st March, 1915, British Guiana Standard Mean Time 3 hours 45 +# mins. 0 secs. slow of Greenwich Mean Time, by notice in Official Gazette on +# 23rd January, 1915." +# +# https://parliament.gov.gy/documents/acts/10923-act_no._27_of_1975_-_interpretation_and_general_clauses_(amendment)_act_1975.pdf +# Interpretation and general clauses (Amendment) Act 1975 (Act No. 27 of 1975) +# [dated 1975-07-31] +# "This Act...shall come into operation on 1st August, 1975." +# "...where any expression of time occurs...the time referred to shall signify +# the standard time of Guyana which shall be three hours behind Greenwich Mean +# Time." +# +# Circular No. 10/1992 dated 1992-03-20 +# https://dps.gov.gy/wp-content/uploads/2018/12/1992-03-20-Circular-010.pdf +# "...cabinet has decided that with effect from Sunday 29th March, 1992, Guyana +# Standard Time would be re-established at 01:00 hours by adjusting the hands +# of the clock back to 24:00 hours." +# Legislated in the Interpretation and general clauses (Amendment) Act 1992 +# (Act No. 6 of 1992) [passed 1992-03-27, published 1992-04-18] +# https://parliament.gov.gy/documents/acts/5885-6_of_1992_interpretation_and_general_clauses_(amendment)_act_1992.pdf + # Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone America/Guyana -3:52:40 - LMT 1915 Mar # Georgetown - -3:45 - -0345 1975 Jul 31 - -3:00 - -03 1991 -# IATA SSIM (1996-06) says -4:00. Assume a 1991 switch. +Zone America/Guyana -3:52:39 - LMT 1911 Aug 1 # Georgetown + -4:00 - -04 1915 Mar 1 + -3:45 - -0345 1975 Aug 1 + -3:00 - -03 1992 Mar 29 1:00 -4:00 - -04 # Paraguay @@ -1685,24 +1693,7 @@ -3:00 - -03 # Trinidad and Tobago -# Zone NAME STDOFF RULES FORMAT [UNTIL] -Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2 - -4:00 - AST - -# These all agree with Trinidad and Tobago since 1970. -Link America/Port_of_Spain America/Anguilla -Link America/Port_of_Spain America/Antigua -Link America/Port_of_Spain America/Dominica -Link America/Port_of_Spain America/Grenada -Link America/Port_of_Spain America/Guadeloupe -Link America/Port_of_Spain America/Marigot # St Martin (French part) -Link America/Port_of_Spain America/Montserrat -Link America/Port_of_Spain America/St_Barthelemy # St Barthélemy -Link America/Port_of_Spain America/St_Kitts # St Kitts & Nevis -Link America/Port_of_Spain America/St_Lucia -Link America/Port_of_Spain America/St_Thomas # Virgin Islands (US) -Link America/Port_of_Spain America/St_Vincent -Link America/Port_of_Spain America/Tortola # Virgin Islands (UK) +# See America/Puerto_Rico. # Uruguay # From Paul Eggert (1993-11-18): diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/theory.html r-cran-tzdb-0.2.0/inst/tzdata/theory.html --- r-cran-tzdb-0.1.2/inst/tzdata/theory.html 2020-11-25 06:07:27.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/theory.html 2021-10-26 18:57:08.000000000 +0000 @@ -42,12 +42,13 @@ (1970-01-01 00:00:00 UTC). -The database labels each timezone with a notable location and -records all known clock transitions for that location. Although 1970 is a somewhat-arbitrary cutoff, there are significant challenges to moving the cutoff earlier even by a decade or two, due to the wide variety of local practices before computer timekeeping became prevalent. +Most timezones correspond to a notable location and the database +records all known clock transitions for that location; +some timezones correspond instead to a fixed UTC offset.

@@ -58,8 +59,9 @@ with current and future timestamps in the traditional North American mountain time zone can choose from the timezones America/Denver which observes US-style daylight saving -time, America/Mazatlan which observes Mexican-style DST, -and America/Phoenix which does not observe DST. +time (DST), +America/Mazatlan which observes Mexican-style DST, +and America/Phoenix which does not observe DST. Applications that also deal with past timestamps in the mountain time zone can choose from over a dozen timezones, such as America/Boise, America/Edmonton, and @@ -68,7 +70,7 @@

-Clock transitions before 1970 are recorded for each timezone, +Clock transitions before 1970 are recorded for location-based timezones, because most systems support timestamps before 1970 and could misbehave if data entries were omitted for pre-1970 transitions. However, the database is not designed for and does not suffice for @@ -190,8 +192,8 @@ TZ strings. A file name component must not exceed 14 characters or start with '-'. - E.g., prefer Asia/Brunei to - Asia/Bandar_Seri_Begawan. + E.g., prefer America/Noronha to + America/Fernando_de_Noronha. Exceptions: see the discussion of legacy names below.

  • @@ -473,10 +475,10 @@

    These abbreviations are: - AMT Amsterdam, Asunción, Athens; + AMT Asunción, Athens; BMT Baghdad, Bangkok, Batavia, Bermuda, Bern, Bogotá, Bridgetown, Brussels, Bucharest; - CMT Calamarca, Caracas, Chisinau, Colón, Copenhagen, Córdoba; + CMT Calamarca, Caracas, Chisinau, Colón, Córdoba; DMT Dublin/Dunsink; EMT Easter; FFMT Fort-de-France; @@ -499,7 +501,8 @@ SMT Santiago, Simferopol, Singapore, Stanley; TBMT Tbilisi; TMT Tallinn, Tehran; - WMT Warsaw. + WMT Warsaw; + ZMT Zomba.

    @@ -513,9 +516,7 @@ 1880–1916, MMT/MST/MDST for Moscow 1880–1919, and RMT/LST for Riga Mean Time and Latvian Summer time 1880–1926. - An extra-special case is SET for Swedish Time (svensk - normaltid) 1879–1899, 3° west of the Stockholm - Observatory. +

  • @@ -702,11 +703,9 @@
  • Sometimes historical timekeeping was specified more precisely than what the tz code can handle. - For example, from 1909 to 1937 Netherlands clocks were legally Amsterdam Mean + For example, from 1880 to 1916 clocks in Ireland observed Dublin Mean Time (estimated to be UT - +00:19:32.13), but the tz + −00:25:21.1), but the tz code cannot represent the fractional second. In practice these old specifications were rarely if ever implemented to subsecond precision. @@ -753,7 +752,8 @@ the Western 06:00 to be 12:00. These practices are largely outside the scope of the tz code and data, which provide only limited support for date and time localization - such as that required by POSIX. If DST is not used a different time zone + such as that required by POSIX. + If DST is not used a different time zone can often do the trick; for example, in Kenya a TZ setting like <-03>3 or America/Cayenne starts the day six hours later than Africa/Nairobi does. @@ -1271,7 +1271,8 @@ counts of seconds since the POSIX epoch normally include leap seconds, as opposed to POSIX time_t counts which exclude leap seconds. This modified timescale is converted to UTC -at the same point that time zone and DST adjustments are applied – +at the same point that time zone and DST +adjustments are applied – namely, at calls to localtime and analogous functions – and the process is driven by leap second information stored in alternate versions of the TZif files. diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/version r-cran-tzdb-0.2.0/inst/tzdata/version --- r-cran-tzdb-0.1.2/inst/tzdata/version 2021-01-24 19:06:03.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/version 2021-10-26 18:57:08.000000000 +0000 @@ -1 +1 @@ -2021a +2021e diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/windowsZones.xml r-cran-tzdb-0.2.0/inst/tzdata/windowsZones.xml --- r-cran-tzdb-0.1.2/inst/tzdata/windowsZones.xml 2021-03-01 17:51:35.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/windowsZones.xml 2021-10-26 18:57:08.000000000 +0000 @@ -267,9 +267,8 @@ - - - + + @@ -287,6 +286,7 @@ + @@ -407,7 +407,6 @@ - @@ -428,6 +427,10 @@ + + + + diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/ziguard.awk r-cran-tzdb-0.2.0/inst/tzdata/ziguard.awk --- r-cran-tzdb-0.1.2/inst/tzdata/ziguard.awk 2020-12-23 19:21:20.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/ziguard.awk 2021-10-26 18:57:08.000000000 +0000 @@ -114,15 +114,16 @@ } } -# If a Link line is followed by a Zone line for the same data, comment +# If a Link line is followed by a Link or Zone line for the same data, comment # out the Link line. This can happen if backzone overrides a Link -# with a Zone. -/^Link/ { - linkline[$3] = NR -} +# with a Zone or a different Link. /^Zone/ { sub(/^Link/, "#Link", line[linkline[$2]]) } +/^Link/ { + sub(/^Link/, "#Link", line[linkline[$3]]) + linkline[$3] = NR +} { line[NR] = $0 } diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/zone1970.tab r-cran-tzdb-0.2.0/inst/tzdata/zone1970.tab --- r-cran-tzdb-0.1.2/inst/tzdata/zone1970.tab 2020-12-02 04:52:23.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/zone1970.tab 2021-10-26 18:57:08.000000000 +0000 @@ -40,11 +40,9 @@ AM +4011+04430 Asia/Yerevan AQ -6617+11031 Antarctica/Casey Casey AQ -6835+07758 Antarctica/Davis Davis -AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville AQ -6736+06253 Antarctica/Mawson Mawson AQ -6448-06406 Antarctica/Palmer Palmer AQ -6734-06808 Antarctica/Rothera Rothera -AQ -690022+0393524 Antarctica/Syowa Syowa AQ -720041+0023206 Antarctica/Troll Troll AQ -7824+10654 Antarctica/Vostok Vostok AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF) @@ -97,7 +95,6 @@ BR -0308-06001 America/Manaus Amazonas (east) BR -0640-06952 America/Eirunepe Amazonas (west) BR -0958-06748 America/Rio_Branco Acre -BS +2505-07721 America/Nassau BT +2728+08939 Asia/Thimphu BY +5354+02734 Europe/Minsk BZ +1730-08812 America/Belize @@ -106,13 +103,11 @@ CA +4612-05957 America/Glace_Bay Atlantic - NS (Cape Breton) CA +4606-06447 America/Moncton Atlantic - New Brunswick CA +5320-06025 America/Goose_Bay Atlantic - Labrador (most areas) -CA +5125-05707 America/Blanc-Sablon AST - QC (Lower North Shore) -CA +4339-07923 America/Toronto Eastern - ON, QC (most areas) +CA,BS +4339-07923 America/Toronto Eastern - ON, QC (most areas), Bahamas CA +4901-08816 America/Nipigon Eastern - ON, QC (no DST 1967-73) CA +4823-08915 America/Thunder_Bay Eastern - ON (Thunder Bay) CA +6344-06828 America/Iqaluit Eastern - NU (most east areas) CA +6608-06544 America/Pangnirtung Eastern - NU (Pangnirtung) -CA +484531-0913718 America/Atikokan EST - ON (Atikokan); NU (Coral H) CA +4953-09709 America/Winnipeg Central - ON (west); Manitoba CA +4843-09434 America/Rainy_River Central - ON (Rainy R, Ft Frances) CA +744144-0944945 America/Resolute Central - NU (Resolute) @@ -123,7 +118,6 @@ CA +690650-1050310 America/Cambridge_Bay Mountain - NU (west) CA +6227-11421 America/Yellowknife Mountain - NT (central) CA +682059-1334300 America/Inuvik Mountain - NT (west) -CA +4906-11631 America/Creston MST - BC (Creston) CA +5946-12014 America/Dawson_Creek MST - BC (Dawson Cr, Ft St John) CA +5848-12242 America/Fort_Nelson MST - BC (Ft Nelson) CA +6043-13503 America/Whitehorse MST - Yukon (east) @@ -131,7 +125,7 @@ CA +4916-12307 America/Vancouver Pacific - BC (most areas) CC -1210+09655 Indian/Cocos CH,DE,LI +4723+00832 Europe/Zurich Swiss time -CI,BF,GM,GN,ML,MR,SH,SL,SN,TG +0519-00402 Africa/Abidjan +CI,BF,GH,GM,GN,ML,MR,SH,SL,SN,TG +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 @@ -142,7 +136,6 @@ CR +0956-08405 America/Costa_Rica CU +2308-08222 America/Havana CV +1455-02331 Atlantic/Cape_Verde -CW,AW,BQ,SX +1211-06900 America/Curacao CX -1025+10543 Indian/Christmas CY +3510+03322 Asia/Nicosia Cyprus (most areas) CY +3507+03357 Asia/Famagusta Northern Cyprus @@ -170,7 +163,6 @@ GB,GG,IM,JE +513030-0000731 Europe/London GE +4143+04449 Asia/Tbilisi GF +0456-05220 America/Cayenne -GH +0533-00013 Africa/Accra GI +3608-00521 Europe/Gibraltar GL +6411-05144 America/Nuuk Greenland (most areas) GL +7646-01840 America/Danmarkshavn National Park (east coast) @@ -204,7 +196,7 @@ KE,DJ,ER,ET,KM,MG,SO,TZ,UG,YT -0117+03649 Africa/Nairobi KG +4254+07436 Asia/Bishkek KI +0125+17300 Pacific/Tarawa Gilbert Islands -KI -0308-17105 Pacific/Enderbury Phoenix Islands +KI -0247-17143 Pacific/Kanton Phoenix Islands KI +0152-15720 Pacific/Kiritimati Line Islands KP +3901+12545 Asia/Pyongyang KR +3733+12658 Asia/Seoul @@ -262,19 +254,19 @@ NU -1901-16955 Pacific/Niue NZ,AQ -3652+17446 Pacific/Auckland New Zealand time NZ -4357-17633 Pacific/Chatham Chatham Islands -PA,KY +0858-07932 America/Panama +PA,CA,KY +0858-07932 America/Panama EST - Panama, Cayman, ON (Atikokan), NU (Coral H) PE -1203-07703 America/Lima PF -1732-14934 Pacific/Tahiti Society Islands PF -0900-13930 Pacific/Marquesas Marquesas Islands PF -2308-13457 Pacific/Gambier Gambier Islands -PG -0930+14710 Pacific/Port_Moresby Papua New Guinea (most areas) +PG,AQ -0930+14710 Pacific/Port_Moresby Papua New Guinea (most areas), Dumont d'Urville PG -0613+15534 Pacific/Bougainville Bougainville PH +1435+12100 Asia/Manila PK +2452+06703 Asia/Karachi PL +5215+02100 Europe/Warsaw PM +4703-05620 America/Miquelon PN -2504-13005 Pacific/Pitcairn -PR +182806-0660622 America/Puerto_Rico +PR,AG,CA,AI,AW,BL,BQ,CW,DM,GD,GP,KN,LC,MF,MS,SX,TT,VC,VG,VI +182806-0660622 America/Puerto_Rico AST PS +3130+03428 Asia/Gaza Gaza Strip PS +313200+0350542 Asia/Hebron West Bank PT +3843-00908 Europe/Lisbon Portugal (mainland) @@ -314,12 +306,12 @@ RU +6728+15343 Asia/Srednekolymsk MSK+08 - Sakha (E); North Kuril Is RU +5301+15839 Asia/Kamchatka MSK+09 - Kamchatka RU +6445+17729 Asia/Anadyr MSK+09 - Bering Sea -SA,KW,YE +2438+04643 Asia/Riyadh +SA,AQ,KW,YE +2438+04643 Asia/Riyadh Arabia, Syowa SB -0932+16012 Pacific/Guadalcanal SC -0440+05528 Indian/Mahe SD +1536+03232 Africa/Khartoum SE +5920+01803 Europe/Stockholm -SG +0117+10351 Asia/Singapore +SG,MY +0117+10351 Asia/Singapore Singapore, peninsular Malaysia SR +0550-05510 America/Paramaribo SS +0451+03137 Africa/Juba ST +0020+00644 Africa/Sao_Tome @@ -334,9 +326,8 @@ TL -0833+12535 Asia/Dili TM +3757+05823 Asia/Ashgabat TN +3648+01011 Africa/Tunis -TO -2110-17510 Pacific/Tongatapu +TO -210800-1751200 Pacific/Tongatapu TR +4101+02858 Europe/Istanbul -TT,AG,AI,BL,DM,GD,GP,KN,LC,MF,MS,VC,VG,VI +1039-06131 America/Port_of_Spain TV -0831+17913 Pacific/Funafuti TW +2503+12130 Asia/Taipei UA +5026+03031 Europe/Kiev Ukraine (most areas) @@ -362,7 +353,7 @@ US +471551-1014640 America/North_Dakota/Beulah Central - ND (Mercer) US +394421-1045903 America/Denver Mountain (most areas) US +433649-1161209 America/Boise Mountain - ID (south); OR (east) -US +332654-1120424 America/Phoenix MST - Arizona (except Navajo) +US,CA +332654-1120424 America/Phoenix MST - Arizona (except Navajo), Creston BC US +340308-1181434 America/Los_Angeles Pacific US +611305-1495401 America/Anchorage Alaska (most areas) US +581807-1342511 America/Juneau Alaska - Juneau area diff -Nru r-cran-tzdb-0.1.2/inst/tzdata/zone.tab r-cran-tzdb-0.2.0/inst/tzdata/zone.tab --- r-cran-tzdb-0.1.2/inst/tzdata/zone.tab 2020-12-02 04:52:23.000000000 +0000 +++ r-cran-tzdb-0.2.0/inst/tzdata/zone.tab 2021-10-26 18:57:08.000000000 +0000 @@ -3,7 +3,7 @@ # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. # -# From Paul Eggert (2018-06-27): +# From Paul Eggert (2021-09-20): # This file is intended as a backward-compatibility aid for older programs. # New programs should use zone1970.tab. This file is like zone1970.tab (see # zone1970.tab's comments), but with the following additional restrictions: @@ -16,6 +16,9 @@ # clocks have agreed since 1970; this is a narrower definition than # that of zone1970.tab. # +# Unlike zone1970.tab, a row's third column can be a Link from +# 'backward' instead of a Zone. +# # This table is intended as an aid for users, to help them select timezones # appropriate for their practical needs. It is not intended to take or # endorse any position on legal or territorial claims. @@ -228,7 +231,7 @@ KG +4254+07436 Asia/Bishkek KH +1133+10455 Asia/Phnom_Penh KI +0125+17300 Pacific/Tarawa Gilbert Islands -KI -0308-17105 Pacific/Enderbury Phoenix Islands +KI -0247-17143 Pacific/Kanton Phoenix Islands KI +0152-15720 Pacific/Kiritimati Line Islands KM -1141+04316 Indian/Comoro KN +1718-06243 America/St_Kitts @@ -391,7 +394,7 @@ TL -0833+12535 Asia/Dili TM +3757+05823 Asia/Ashgabat TN +3648+01011 Africa/Tunis -TO -2110-17510 Pacific/Tongatapu +TO -210800-1751200 Pacific/Tongatapu TR +4101+02858 Europe/Istanbul TT +1039-06131 America/Port_of_Spain TV -0831+17913 Pacific/Funafuti diff -Nru r-cran-tzdb-0.1.2/man/tzdb-package.Rd r-cran-tzdb-0.2.0/man/tzdb-package.Rd --- r-cran-tzdb-0.1.2/man/tzdb-package.Rd 2021-07-20 17:06:56.000000000 +0000 +++ r-cran-tzdb-0.2.0/man/tzdb-package.Rd 2021-10-18 21:18:59.000000000 +0000 @@ -6,15 +6,7 @@ \alias{tzdb-package} \title{tzdb: Time Zone Database Information} \description{ -Provides an up-to-date copy of the Internet Assigned Numbers - Authority (IANA) Time Zone Database. It is updated periodically to - reflect changes made by political bodies to time zone boundaries, UTC - offsets, and daylight saving time rules. Additionally, this package - provides a C++ interface for working with the 'date' library. 'date' - provides comprehensive support for working with dates and date-times, - which this package exposes to make it easier for other R packages to - utilize. Headers are provided for calendar specific calculations, - along with a limited interface for time zone manipulations. +Provides an up-to-date copy of the Internet Assigned Numbers Authority (IANA) Time Zone Database. It is updated periodically to reflect changes made by political bodies to time zone boundaries, UTC offsets, and daylight saving time rules. Additionally, this package provides a C++ interface for working with the 'date' library. 'date' provides comprehensive support for working with dates and date-times, which this package exposes to make it easier for other R packages to utilize. Headers are provided for calendar specific calculations, along with a limited interface for time zone manipulations. } \seealso{ Useful links: diff -Nru r-cran-tzdb-0.1.2/MD5 r-cran-tzdb-0.2.0/MD5 --- r-cran-tzdb-0.1.2/MD5 2021-07-20 17:50:02.000000000 +0000 +++ r-cran-tzdb-0.2.0/MD5 2021-10-27 13:20:02.000000000 +0000 @@ -1,18 +1,18 @@ -0e22863eef58c6b5b4bb65de941643cf *DESCRIPTION +750faf84c2eb78a61690672b401da641 *DESCRIPTION 39c808376c4051a18a42033f78e85b41 *LICENSE 11693a377f3751a3e6d082297a4c5baf *LICENSE.note 670988a98f1e943dc85845f5eb62f507 *NAMESPACE -045a2b2ce2e1a914902a689ff0b3be1a *NEWS.md -bcd2d36231f1f9859945561a60d557e0 *R/cpp11.R +e24da95e5c711baa6e0ee04bc296bfc2 *NEWS.md +db53946e190ec0c9f38f233f34d4f0d6 *R/cpp11.R d436e1409fe7bcaa98219f39f1c29da6 *R/initialize.R 6ef8298468cc985063c191953581716d *R/names.R -5892964b84f3858c0b8756a796f61df4 *R/path.R +d2abfc6c8214882c1b3c3d5a0eb76a62 *R/path.R 1fec557f198bfc2a3a5fa456588f84d1 *R/tzdb-package.R efa7ca1837029846539a3c1e7a2ad5ec *R/version.R -d49c9b7bdca7aff85a1e1a104f287abc *R/zzz.R +c7acfdbb175fd3fb66ef3a8d5814cfba *R/zzz.R 6d043ed5a92f9be5e06ad642087790c1 *README.md 17782665d3a7dfe6aa7a03b5a605abf8 *inst/include/date/chrono_io.h -79c671d770a2e07f6ed9a7e0597e2a40 *inst/include/date/date.h +dbb9974d66b3a8dcd55d7c644908f27a *inst/include/date/date.h b6ca74e6f7137c05b97d27d43ef5188c *inst/include/date/ios.h f78efe7eb3c499caf89584227b94aa11 *inst/include/date/islamic.h d9079fc1458c23f8eef3d2fe73bf00f9 *inst/include/date/iso_week.h @@ -30,38 +30,39 @@ 1faab029dbadac16fab2a770abaf77ea *inst/include/tzdb/solar_hijri.h 9519a720bd6d0d0b26dfa91c9b6d82c1 *inst/include/tzdb/tz.h 28b669883ac0a3c475572efc228e8e03 *inst/include/tzdb/tzdb.h -6ba40471fffd2b212016d9a949bf682d *inst/tzdata/CONTRIBUTING +47c9602c66c74859b4d8570e19d9dcd4 *inst/tzdata/CONTRIBUTING c679c9d6b02bc2757b3eaf8f53c43fba *inst/tzdata/LICENSE -7fc97502221f23a56ef9ba7a80b96dcc *inst/tzdata/Makefile -dc9b935e6fff02e51a64ce4328c3d5fe *inst/tzdata/NEWS +6800236b6dd15bab4bcd3af92ba8075b *inst/tzdata/Makefile +9394d2f6e964361fe6235e701ee37b79 *inst/tzdata/NEWS 241dd746c26b3ced3bfefc7da5105838 *inst/tzdata/README -595167717cfebba92ec250248776f990 *inst/tzdata/africa -dcb3586a84d977c53533f3d5b9180b77 *inst/tzdata/antarctica -6cbc6931b38378d06a453e5a70eba1e6 *inst/tzdata/asia -e892f0bbb23177b214be2c997be376e3 *inst/tzdata/australasia -419136f6925f2d7ef3e03f3f56188b69 *inst/tzdata/backward -416bf31172dcdfd33b4873c9947c1a89 *inst/tzdata/backzone +627dca30f2d9c766e4ed84ed3ee4c441 *inst/tzdata/SECURITY +e682bc12f4bba9f14875f04c5256fa1a *inst/tzdata/africa +8e217c1cb79b355ccf8384510557ef63 *inst/tzdata/antarctica +10c2edfbb5857aba0c8b37cfe1f6b7df *inst/tzdata/asia +1726fc7d2fa05c77012f8245d9be0fbd *inst/tzdata/australasia +c552716f1e270803d330d5f4b75d1683 *inst/tzdata/backward +57cca664a6eee7e469d6e6cc6bb8b5fe *inst/tzdata/backzone 8582626d5b5fe1b68c9e052f894bf0a5 *inst/tzdata/calendars 6e102420c035b799eb44b364165f317e *inst/tzdata/checklinks.awk -3567caf25db0922721ae5c0a24e8ba20 *inst/tzdata/checktab.awk +11688a9c4dd78f8a81738a7c4ac143d6 *inst/tzdata/checktab.awk 1f144507c835953384319f1d441f4c1b *inst/tzdata/etcetera -3126a2835ecfed01876575dc7a2967c9 *inst/tzdata/europe +39a6d322ebe35ffc77c74a05bb22526d *inst/tzdata/europe 21056cf24bf9bab9a1d75fb3b2d796e1 *inst/tzdata/factory 22b35b3817db585e12c4e2db934c9680 *inst/tzdata/iso3166.tab -40f6d086e85635b29927b4e1948bc9c4 *inst/tzdata/leap-seconds.list -cf361cfd45c2547a044f48855d7e5d5c *inst/tzdata/leapseconds +884ea255987aae77f4b4886bcef883ef *inst/tzdata/leap-seconds.list +7c55955b0ba6d33b0c944b093ddb9dd1 *inst/tzdata/leapseconds 6fb18061b642090fd855c9cef26f84c1 *inst/tzdata/leapseconds.awk -2461a327b8394f09a41d1c9e127f8a2f *inst/tzdata/northamerica -0354e424fc1ae0b0b641e403666e8698 *inst/tzdata/southamerica -14662c1bbcfc2aed01a7159a67901a60 *inst/tzdata/theory.html -cb9a80bc95a1a108b6fdf59d8d4519c0 *inst/tzdata/version -493d5cb7ca9d018bac66061437506131 *inst/tzdata/windowsZones.xml -3a0dd40df9f0569b8d845d979c3255ba *inst/tzdata/ziguard.awk +e1270ec783b2f0a392af7965e62684c7 *inst/tzdata/northamerica +0d34edb5c1d5ff9b93c7d10a4b098c9b *inst/tzdata/southamerica +0777206f0aa7702261b9669ae0a0fcc4 *inst/tzdata/theory.html +d824e4685ddc30f8f689b44344c5419d *inst/tzdata/version +8f1c75c0795643d6c9bc9318d607edf7 *inst/tzdata/windowsZones.xml +4c526a73163b4503bb9c220833b224bb *inst/tzdata/ziguard.awk 1cc0676419743a76d5cb1fb03805084b *inst/tzdata/zishrink.awk -02dddc33edc3a0eeb783555dc2ce1156 *inst/tzdata/zone.tab -2b7b091f4b1c41d6384b254f55654299 *inst/tzdata/zone1970.tab +12af45ac1272f7ba4a5be471fe5f815b *inst/tzdata/zone.tab +bf87a492da8dcc71a933f278fc7a1dee *inst/tzdata/zone1970.tab 5d714603d98417050cd3fcd4745146bc *inst/tzdata/zoneinfo2tdf.pl -2dd60e7a9cc71ae223a3f9f2114f7beb *man/tzdb-package.Rd +231be39e9b6f03560dc7e375664e309a *man/tzdb-package.Rd 29b2f70ab9f7503eb5cf309aa850e08a *man/tzdb_initialize.Rd 1379dfd6c3b2eafe85cb93aaa87af554 *man/tzdb_names.Rd 5f05248c4b70119f858ea631a39785c7 *man/tzdb_path.Rd @@ -69,14 +70,14 @@ 9331907280193a11c3f971b134d893b5 *src/Makevars 4145bebcad4d0719b68ae6351f8bbfe0 *src/Makevars.win 9fd8c603fb61103fd604f08aab1495a1 *src/api.cpp -9905b5a5113d3deb7b00cbfe0253d551 *src/cpp11.cpp -64a746739de5aaf987cea7394499f8f5 *src/names.cpp -f7c3261f73080222e78fb4fc53ac3b4c *src/path.cpp -e80ec38d3962c01a8f06a543806488d3 *src/tz.cpp +eb29dea23681193764033ff21d97827e *src/cpp11.cpp +409ce791898b781759f59afe7499a19f *src/names.cpp +8d632031f5828829579ec8a3c7a460bb *src/path.cpp +b53c1e17845f477f877d889fe2bf6a4e *src/tz.cpp 89ad9c2fa7b20349047dacb476f4d218 *src/version.cpp a86461b14d9cbe609bd239743da8339d *tests/testthat.R fecfe3f92f695fa77ee11303ddc2dc3f *tests/testthat/_snaps/path.md b86c397091381e00c5a052ac8a9e5884 *tests/testthat/test-initialize.R -4bc5d9b3e020a8174585c91ba8661e0a *tests/testthat/test-names.R -eda7184f12160b12df06d0f87a1fe853 *tests/testthat/test-path.R -5912b21bb6a00d3c36980a3efda87af3 *tests/testthat/test-version.R +90c9e362bcf6f0265fa2436191d8fe9e *tests/testthat/test-names.R +befb88aedf3fe570340c04c194c6ed74 *tests/testthat/test-path.R +4a70b7409b9440bb97dfbc9ef8382833 *tests/testthat/test-version.R diff -Nru r-cran-tzdb-0.1.2/NEWS.md r-cran-tzdb-0.2.0/NEWS.md --- r-cran-tzdb-0.1.2/NEWS.md 2021-07-20 17:11:53.000000000 +0000 +++ r-cran-tzdb-0.2.0/NEWS.md 2021-10-26 20:25:15.000000000 +0000 @@ -1,3 +1,12 @@ +# tzdb 0.2.0 + +* Updated the time zone database to 2021e (#12). + +* Updated the embedded date library (SHA d9049ee6976f45eff434c4971baa78ff807562c4). + +* Fixed a Windows issue where the time zone database couldn't be found if the + path to it contained Unicode characters (#10). + # tzdb 0.1.2 * Updated the embedded date library. diff -Nru r-cran-tzdb-0.1.2/R/cpp11.R r-cran-tzdb-0.2.0/R/cpp11.R --- r-cran-tzdb-0.1.2/R/cpp11.R 2021-07-13 18:43:22.000000000 +0000 +++ r-cran-tzdb-0.2.0/R/cpp11.R 2021-10-26 20:19:59.000000000 +0000 @@ -8,6 +8,14 @@ invisible(.Call(`_tzdb_tzdb_set_install_cpp`, path)) } +tzdb_reload_cpp <- function() { + invisible(.Call(`_tzdb_tzdb_reload_cpp`)) +} + +tzdb_use_os_tzdb_cpp <- function() { + .Call(`_tzdb_tzdb_use_os_tzdb_cpp`) +} + tzdb_version_cpp <- function() { .Call(`_tzdb_tzdb_version_cpp`) } diff -Nru r-cran-tzdb-0.1.2/R/path.R r-cran-tzdb-0.2.0/R/path.R --- r-cran-tzdb-0.1.2/R/path.R 2021-03-01 18:01:28.000000000 +0000 +++ r-cran-tzdb-0.2.0/R/path.R 2021-10-26 17:48:44.000000000 +0000 @@ -12,9 +12,31 @@ #' @examples #' tzdb_path("text") tzdb_path <- function(type) { - if (identical(type, "text")) { - system.file("tzdata", package = "tzdb", mustWork = TRUE) - } else { + if (!identical(type, "text")) { stop("`type` must be 'text'.", call. = FALSE) } + + path <- system.file("tzdata", package = "tzdb", mustWork = TRUE) + path <- chr_reencode(path) + + path +} + +tzdb_set_install <- function(path) { + path <- chr_reencode(path) + tzdb_set_install_cpp(path) +} + +chr_reencode <- function(x) { + if (on_windows()) { + enc2utf8(x) + } else { + enc2native(x) + } +} +on_windows <- function() { + identical("windows", os_name()) +} +os_name <- function() { + tolower(Sys.info()[["sysname"]]) } diff -Nru r-cran-tzdb-0.1.2/R/zzz.R r-cran-tzdb-0.2.0/R/zzz.R --- r-cran-tzdb-0.1.2/R/zzz.R 2021-04-20 16:07:00.000000000 +0000 +++ r-cran-tzdb-0.2.0/R/zzz.R 2021-10-26 17:48:44.000000000 +0000 @@ -2,7 +2,7 @@ .onLoad <- function(libname, pkgname) { path <- tzdb_path(type = "text") - tzdb_set_install_cpp(path) + tzdb_set_install(path) } # nocov end diff -Nru r-cran-tzdb-0.1.2/src/cpp11.cpp r-cran-tzdb-0.2.0/src/cpp11.cpp --- r-cran-tzdb-0.1.2/src/cpp11.cpp 2021-07-13 18:43:22.000000000 +0000 +++ r-cran-tzdb-0.2.0/src/cpp11.cpp 2021-10-26 20:19:59.000000000 +0000 @@ -3,6 +3,7 @@ #include "cpp11/declarations.hpp" +#include // names.cpp cpp11::writable::strings tzdb_names_cpp(); @@ -19,6 +20,21 @@ return R_NilValue; END_CPP11 } +// path.cpp +void tzdb_reload_cpp(); +extern "C" SEXP _tzdb_tzdb_reload_cpp() { + BEGIN_CPP11 + tzdb_reload_cpp(); + return R_NilValue; + END_CPP11 +} +// path.cpp +bool tzdb_use_os_tzdb_cpp(); +extern "C" SEXP _tzdb_tzdb_use_os_tzdb_cpp() { + BEGIN_CPP11 + return cpp11::as_sexp(tzdb_use_os_tzdb_cpp()); + END_CPP11 +} // version.cpp cpp11::writable::strings tzdb_version_cpp(); extern "C" SEXP _tzdb_tzdb_version_cpp() { @@ -28,14 +44,11 @@ } extern "C" { -/* .Call calls */ -extern SEXP _tzdb_tzdb_names_cpp(); -extern SEXP _tzdb_tzdb_set_install_cpp(SEXP); -extern SEXP _tzdb_tzdb_version_cpp(); - static const R_CallMethodDef CallEntries[] = { {"_tzdb_tzdb_names_cpp", (DL_FUNC) &_tzdb_tzdb_names_cpp, 0}, + {"_tzdb_tzdb_reload_cpp", (DL_FUNC) &_tzdb_tzdb_reload_cpp, 0}, {"_tzdb_tzdb_set_install_cpp", (DL_FUNC) &_tzdb_tzdb_set_install_cpp, 1}, + {"_tzdb_tzdb_use_os_tzdb_cpp", (DL_FUNC) &_tzdb_tzdb_use_os_tzdb_cpp, 0}, {"_tzdb_tzdb_version_cpp", (DL_FUNC) &_tzdb_tzdb_version_cpp, 0}, {NULL, NULL, 0} }; @@ -43,7 +56,7 @@ void api_init(DllInfo* dll); -extern "C" void R_init_tzdb(DllInfo* dll){ +extern "C" attribute_visible void R_init_tzdb(DllInfo* dll){ R_registerRoutines(dll, NULL, CallEntries, NULL, NULL); R_useDynamicSymbols(dll, FALSE); api_init(dll); diff -Nru r-cran-tzdb-0.1.2/src/names.cpp r-cran-tzdb-0.2.0/src/names.cpp --- r-cran-tzdb-0.1.2/src/names.cpp 2021-05-07 21:29:24.000000000 +0000 +++ r-cran-tzdb-0.2.0/src/names.cpp 2021-10-26 20:20:55.000000000 +0000 @@ -65,8 +65,7 @@ cpp11::unwind_protect([&] { for (R_xlen_t i = 0; i < n_zones; ++i) { const std::string& name = zones[i]; - SEXP elt = Rf_mkCharLenCE(name.c_str(), name.size(), CE_UTF8); - SET_STRING_ELT(out, i, elt); + SET_STRING_ELT(out, i, Rf_mkCharLenCE(name.c_str(), name.size(), CE_UTF8)); } }); diff -Nru r-cran-tzdb-0.1.2/src/path.cpp r-cran-tzdb-0.2.0/src/path.cpp --- r-cran-tzdb-0.1.2/src/path.cpp 2021-04-20 16:07:00.000000000 +0000 +++ r-cran-tzdb-0.2.0/src/path.cpp 2021-10-26 17:48:44.000000000 +0000 @@ -21,3 +21,29 @@ date::set_install(string_path); #endif } + +/* + * Force a reload of the internal tzdb structure. + * This allows you to update the database if your installation path has been + * changed. + */ +[[cpp11::register]] +void +tzdb_reload_cpp() { +#if !USE_OS_TZDB + date::reload_tzdb(); +#endif +} + +/* + * Determine at the R level if we are using the OS tzdb or not + */ +[[cpp11::register]] +bool +tzdb_use_os_tzdb_cpp() { +#if USE_OS_TZDB + return true; +#else + return false; +#endif +} diff -Nru r-cran-tzdb-0.1.2/src/tz.cpp r-cran-tzdb-0.2.0/src/tz.cpp --- r-cran-tzdb-0.1.2/src/tz.cpp 2021-07-20 17:04:20.000000000 +0000 +++ r-cran-tzdb-0.2.0/src/tz.cpp 2021-10-26 18:36:56.000000000 +0000 @@ -198,6 +198,37 @@ using co_task_mem_ptr = std::unique_ptr; } +// tzdb-edit-start +static +std::wstring +convert_utf8_to_utf16(const std::string& s) +{ + std::wstring out; + const int size = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, NULL, 0); + + if (size == 0) + { + std::string msg = "Failed to determine required size when converting \""; + msg += s; + msg += "\" to UTF-16."; + throw std::runtime_error(msg); + } + + out.resize(size); + const int check = MultiByteToWideChar(CP_UTF8, 0, s.c_str(), -1, &out[0], size); + + if (size != check) + { + std::string msg = "Failed to convert \""; + msg += s; + msg += "\" to UTF-16."; + throw std::runtime_error(msg); + } + + return out; +} +// tzdb-edit-stop + // We might need to know certain locations even if not using the remote API, // so keep these routines out of that block for now. static @@ -267,6 +298,90 @@ # endif // !_WIN32 + +// tzdb-edit-start +/* + * This class is provided to mimic the following usage of `ifstream`: + * + * std::ifstream is(filename); + * + * file_streambuf ibuf(filename); + * std::istream is(&ibuf); + * + * This is required because `ifstream` does not support opening files + * containing wide characters on Windows. On Windows, `file_streambuf` uses + * `file_open()` to convert the file name to UTF-16 before opening it with + * `_wfopen()`. + * + * Note that this is not an exact re-implementation of `ifstream`, + * but is enough for usage here. + * + * It is partially based on these two implementations: + * - fdinbuf from http://www.josuttis.com/cppcode/fdstream.html + * - stdiobuf https://stackoverflow.com/questions/12342542/convert-file-to-ifstream-c-android-ndk + * + * Apparently MSVC provides non-standard overloads of `ifstream` that support + * a `const wchar_t*` file name, but MinGW does not https://stackoverflow.com/a/822032 + */ +class file_streambuf + : public std::streambuf +{ +private: + FILE* file_; + static const int buffer_size_ = 1024; + char buffer_[buffer_size_]; + +public: + file_streambuf(const std::string& filename) + : file_(file_open(filename)) + { + } + + ~file_streambuf() + { + if (file_) + { + ::fclose(file_); + } + } + +protected: + virtual + int_type + underflow() + { + if (gptr() == egptr() && file_) + { + const size_t size = ::fread(buffer_, 1, buffer_size_, file_); + setg(buffer_, buffer_, buffer_ + size); + } + return (gptr() == egptr()) + ? traits_type::eof() + : traits_type::to_int_type(*gptr()); + } + +private: + FILE* + file_open(const std::string& filename) + { +# ifdef _WIN32 + std::wstring wfilename = convert_utf8_to_utf16(filename); + FILE* file = ::_wfopen(wfilename.c_str(), L"rb"); +# else // !_WIN32 + FILE* file = ::fopen(filename.c_str(), "rb"); +# endif // _WIN32 + if (file == NULL) + { + std::string msg = "Error opening file \""; + msg += filename; + msg += "\"."; + throw std::runtime_error(msg); + } + return file; + } +}; +// tzdb-edit-stop + #endif // !USE_OS_TZDB namespace date @@ -559,15 +674,19 @@ std::vector mappings; std::string line; - std::ifstream is(input_path); - if (!is.is_open()) - { - // We don't emit file exceptions because that's an implementation detail. - std::string msg = "Error opening time zone mapping file \""; - msg += input_path; - msg += "\"."; - throw std::runtime_error(msg); - } + // tzdb-edit-start + // std::ifstream is(input_path); + // if (!is.is_open()) + // { + // // We don't emit file exceptions because that's an implementation detail. + // std::string msg = "Error opening time zone mapping file \""; + // msg += input_path; + // msg += "\"."; + // throw std::runtime_error(msg); + // } + file_streambuf ibuf(input_path); + std::istream is(&ibuf); + // tzdb-edit-stop auto error = [&input_path, &line_num](const char* info) { @@ -697,7 +816,9 @@ } } - is.close(); + // tzdb-edit-start + // is.close(); + // tzdb-edit-stop return mappings; } @@ -2679,16 +2800,16 @@ std::getline(in, line); if (!line.empty() && line[0] != '#') { - std::istringstream in(line); - in.exceptions(std::ios::failbit | std::ios::badbit); + std::istringstream iss(line); + iss.exceptions(std::ios::failbit | std::ios::badbit); std::string word; - in >> word; + iss >> word; if (word == "Leap") { int y, m, d; - in >> y; - m = static_cast(parse_month(in)); - in >> d; + iss >> y; + m = static_cast(parse_month(iss)); + iss >> d; leap_seconds.push_back(leap_second(sys_days{year{y}/m/d} + days{1}, detail::undocumented{})); } @@ -2715,11 +2836,11 @@ std::getline(in, line); if (!line.empty() && line[0] != '#') { - std::istringstream in(line); - in.exceptions(std::ios::failbit | std::ios::badbit); + std::istringstream iss(line); + iss.exceptions(std::ios::failbit | std::ios::badbit); using seconds = std::chrono::seconds; seconds::rep s; - in >> s; + iss >> s; if (s == 2272060800) continue; leap_seconds.push_back(leap_second(sys_seconds{seconds{s}} - offset, @@ -2848,7 +2969,11 @@ file_exists(const std::string& filename) { #ifdef _WIN32 - return ::_access(filename.c_str(), 0) == 0; + // tzdb-edit-start + // return ::_access(filename.c_str(), 0) == 0; + std::wstring wfilename = convert_utf8_to_utf16(filename); + return ::_waccess(wfilename.c_str(), 0) == 0; + // tzdb-edit-stop #else return ::access(filename.c_str(), F_OK) == 0; #endif @@ -3420,21 +3545,60 @@ #endif // HAS_REMOTE_API +// tzdb-edit-start +// static +// std::string +// get_version(const std::string& path) +// { +// std::string version; +// std::ifstream infile(path + "version"); +// if (infile.is_open()) +// { +// infile >> version; +// if (!infile.fail()) +// return version; +// } +// else +// { +// infile.open(path + "NEWS"); +// while (infile) +// { +// infile >> version; +// if (version == "Release") +// { +// infile >> version; +// return version; +// } +// } +// } +// throw std::runtime_error("Unable to get Timezone database version from " + path); +// } static std::string get_version(const std::string& path) { std::string version; - std::ifstream infile(path + "version"); - if (infile.is_open()) + + std::string path_version = path + "version"; + + if (file_exists(path_version)) { + file_streambuf inbuf(path_version); + std::istream infile(&inbuf); + infile >> version; + if (!infile.fail()) return version; } - else + + std::string path_news = path + "NEWS"; + + if (file_exists(path_news)) { - infile.open(path + "NEWS"); + file_streambuf inbuf(path_news); + std::istream infile(&inbuf); + while (infile) { infile >> version; @@ -3445,8 +3609,10 @@ } } } + throw std::runtime_error("Unable to get Timezone database version from " + path); } +// tzdb-edit-stop static std::unique_ptr @@ -3516,7 +3682,16 @@ for (const auto& filename : files) { - std::ifstream infile(path + filename); + // tzdb-edit-start + // std::ifstream infile(path + filename); + std::string file_path = path + filename; + if (!file_exists(file_path)) + { + continue; + } + file_streambuf inbuf(file_path); + std::istream infile(&inbuf); + // tzdb-edit-stop while (infile) { std::getline(infile, line); @@ -3933,7 +4108,7 @@ auto p = result.find("ZONE=\""); if (p != std::string::npos) { - result.erase(p, p+6); + result.erase(0, p+6); result.erase(result.rfind('"')); return locate_zone(result); } diff -Nru r-cran-tzdb-0.1.2/tests/testthat/test-names.R r-cran-tzdb-0.2.0/tests/testthat/test-names.R --- r-cran-tzdb-0.1.2/tests/testthat/test-names.R 2021-04-20 16:07:00.000000000 +0000 +++ r-cran-tzdb-0.2.0/tests/testthat/test-names.R 2021-10-26 18:57:08.000000000 +0000 @@ -1,4 +1,4 @@ test_that("can get database names with known length", { names <- tzdb_names() - expect_length(names, 593) + expect_length(names, 594) }) diff -Nru r-cran-tzdb-0.1.2/tests/testthat/test-path.R r-cran-tzdb-0.2.0/tests/testthat/test-path.R --- r-cran-tzdb-0.1.2/tests/testthat/test-path.R 2021-03-01 18:00:10.000000000 +0000 +++ r-cran-tzdb-0.2.0/tests/testthat/test-path.R 2021-10-26 18:57:08.000000000 +0000 @@ -7,3 +7,60 @@ test_that("can only use text right now", { expect_snapshot_error(tzdb_path("binary")) }) + +test_that("path to the text `tzdata` can contain Unicode (#10)", { + skip_on_cran() + skip_if(tzdb_use_os_tzdb_cpp()) + + # Get existing install location and all files to copy + dir_old <- tzdb_path(type = "text") + on.exit({ + tzdb_set_install(dir_old) + tzdb_reload_cpp() + }, add = TRUE) + + files_old <- dir(dir_old, full.names = TRUE) + base_names <- basename(files_old) + + # Copy files into a temp directory with a Unicode name + dir_temp <- tempdir() + + dir_new <- paste0(dir_temp, "/", "\u5bf0\u612d") + dir_new <- chr_reencode(dir_new) + dir.create(dir_new) + on.exit(unlink(dir_new, recursive = TRUE), add = TRUE) + + files_new <- paste0(dir_new, "/", base_names) + files_new <- chr_reencode(files_new) + + copied <- file.copy(files_old, files_new) + expect_true(all(copied)) + + # Change the version in the file so we have something to check + path_version_new <- files_new[base_names == "version"] + expect_length(path_version_new, 1L) + + write_version <- function(path, version) { + # Small helper to ensure we close the file before reading from it + con <- file(path, open = "wb", encoding = "UTF-8") + on.exit(close(con), add = TRUE) + + writeLines(version, con = con, useBytes = TRUE) + } + + version <- chr_reencode("9999a") + write_version(path_version_new, version) + + # Change the install directory, reload the database, and check for the new version + tzdb_set_install(dir_new) + tzdb_reload_cpp() + + expect_identical(tzdb_version(), version) +}) + +test_that("version has been reverted back to the original after running the above test (#10)", { + skip_on_cran() + skip_if(tzdb_use_os_tzdb_cpp()) + + expect_identical(tzdb_version(), "2021e") +}) diff -Nru r-cran-tzdb-0.1.2/tests/testthat/test-version.R r-cran-tzdb-0.2.0/tests/testthat/test-version.R --- r-cran-tzdb-0.1.2/tests/testthat/test-version.R 2021-03-01 17:49:03.000000000 +0000 +++ r-cran-tzdb-0.2.0/tests/testthat/test-version.R 2021-10-26 18:57:08.000000000 +0000 @@ -1,3 +1,3 @@ test_that("version is correct", { - expect_identical(tzdb_version(), "2021a") + expect_identical(tzdb_version(), "2021e") })