Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-tzinfo-1.2 for openSUSE:Factory checked in at 2021-01-21 21:56:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-tzinfo-1.2 (Old) and /work/SRC/openSUSE:Factory/.rubygem-tzinfo-1.2.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-tzinfo-1.2" Thu Jan 21 21:56:10 2021 rev:5 rq:865219 version:1.2.9 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-tzinfo-1.2/rubygem-tzinfo-1.2.changes 2020-11-11 20:47:20.595700584 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-tzinfo-1.2.new.28504/rubygem-tzinfo-1.2.changes 2021-01-21 21:56:11.973829213 +0100 @@ -1,0 +2,16 @@ +Wed Jan 20 13:31:51 UTC 2021 - Stephan Kulow <[email protected]> + +updated to version 1.2.9 + see installed CHANGES.md + + Version 1.2.9 - 16-Dec-2020 + --------------------------- + + * Fixed an incorrect InvalidTimezoneIdentifier exception raised when loading a + zoneinfo file that includes rules specifying an additional transition to the + final defined offset (for example, Africa/Casablanca in version 2018e of the + Time Zone Database). #123. + + + +------------------------------------------------------------------- Old: ---- tzinfo-1.2.8.gem New: ---- tzinfo-1.2.9.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-tzinfo-1.2.spec ++++++ --- /var/tmp/diff_new_pack.uQI8te/_old 2021-01-21 21:56:12.993829924 +0100 +++ /var/tmp/diff_new_pack.uQI8te/_new 2021-01-21 21:56:12.993829924 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-tzinfo-1.2 # -# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -24,7 +24,7 @@ # Name: rubygem-tzinfo-1.2 -Version: 1.2.8 +Version: 1.2.9 Release: 0 %define mod_name tzinfo %define mod_full_name %{mod_name}-%{version} @@ -36,11 +36,11 @@ %endif # /MANUAL BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: ruby-macros >= 5 BuildRequires: %{ruby >= 1.8.7} BuildRequires: %{rubygem gem2rpm} BuildRequires: %{rubygem rdoc > 3.10} -Url: https://tzinfo.github.io +BuildRequires: ruby-macros >= 5 +URL: https://tzinfo.github.io Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1: gem2rpm.yml Summary: Daylight savings aware timezone library ++++++ tzinfo-1.2.8.gem -> tzinfo-1.2.9.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGES.md new/CHANGES.md --- old/CHANGES.md 2020-11-08 12:59:45.000000000 +0100 +++ new/CHANGES.md 2020-12-16 21:32:03.000000000 +0100 @@ -1,3 +1,12 @@ +Version 1.2.9 - 16-Dec-2020 +--------------------------- + +* Fixed an incorrect InvalidTimezoneIdentifier exception raised when loading a + zoneinfo file that includes rules specifying an additional transition to the + final defined offset (for example, Africa/Casablanca in version 2018e of the + Time Zone Database). #123. + + Version 1.2.8 - 8-Nov-2020 -------------------------- @@ -5,7 +14,7 @@ default by zic version 2020b and later. The POSIX-style TZ string is now used calculate DST transition times after the final defined transition in the file. The 64-bit section is now always used regardless of whether Time has support - for 64-bit times. + for 64-bit times. #120. * Rubinius is no longer supported. Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ Binary files old/checksums.yaml.gz.sig and new/checksums.yaml.gz.sig differ Binary files old/data.tar.gz.sig and new/data.tar.gz.sig differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/tzinfo/zoneinfo_timezone_info.rb new/lib/tzinfo/zoneinfo_timezone_info.rb --- old/lib/tzinfo/zoneinfo_timezone_info.rb 2020-11-08 12:59:45.000000000 +0100 +++ new/lib/tzinfo/zoneinfo_timezone_info.rb 2020-12-16 21:32:03.000000000 +0100 @@ -313,8 +313,13 @@ last_year = (Time.at(last_defined[:at]).utc + previous_offset[:utc_total_offset]).year if last_year <= GENERATE_UP_TO - generated = rules.transitions(last_year).find_all {|t| t.at > last_defined[:at] } + - (last_year + 1).upto(GENERATE_UP_TO).map {|y| rules.transitions(y) }.flatten + last_defined_offset = offsets[last_defined[:offset]] + + generated = rules.transitions(last_year).find_all do |t| + t.at > last_defined[:at] && !offset_matches_rule?(last_defined_offset, t.offset) + end + + generated += (last_year + 1).upto(GENERATE_UP_TO).map {|y| rules.transitions(y) }.flatten unless generated.empty? transitions[-1] = validate_and_fix_last_defined_transition_offset(file, offsets, last_defined, generated[0].previous_offset) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2020-11-08 12:59:45.000000000 +0100 +++ new/metadata 2020-12-16 21:32:03.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: tzinfo version: !ruby/object:Gem::Version - version: 1.2.8 + version: 1.2.9 platform: ruby authors: - Philip Ross @@ -29,7 +29,7 @@ J3Zn/kSTjTekiaspyGbczC3PUaeJNxr+yCvR4sk71Xmk/GaKKGOHedJ1uj/LAXrA MR0mpl7b8zCg0PFC1J73uw== -----END CERTIFICATE----- -date: 2020-11-08 00:00:00.000000000 Z +date: 2020-12-16 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: thread_safe Binary files old/metadata.gz.sig and new/metadata.gz.sig differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/tc_zoneinfo_timezone_info.rb new/test/tc_zoneinfo_timezone_info.rb --- old/test/tc_zoneinfo_timezone_info.rb 2020-11-08 12:59:45.000000000 +0100 +++ new/test/tc_zoneinfo_timezone_info.rb 2020-12-16 21:32:03.000000000 +0100 @@ -1895,7 +1895,18 @@ end end - def test_load_tz_string_specifies_transition_to_offset_of_final_transition_same_year + def test_load_tz_string_specifies_transition_to_offset_of_final_transition_same_year_skip_dst_start + # TZInfo v1.2.8 considered this to be an error. However, this is a valid + # situation with Africa/Casablanca in 2018e. + # + # The last defined transitions are: + # At 2037-03-29 02:00Z change to WEST UTC+1 + # At 2037-10-04 02:00Z change to WET UTC+0 + # + # The rules define the end of DST to be at 03:00 local time on the last + # Sunday of October (2037-10-31). This later transition needs to be + # ignored. + offsets = [ {:gmtoff => 7142, :isdst => false, :abbrev => 'LMT'}, {:gmtoff => 7200, :isdst => false, :abbrev => 'XST'}, @@ -1916,9 +1927,76 @@ JulianDayOfYearTransitionRule.new(300, 7200) ) + generate_up_to = ZoneinfoTimezoneInfo::GENERATE_UP_TO + + tzif_test(offsets, transitions, :rules => rules) do |path, format| + info = ZoneinfoTimezoneInfo.new('Ignore/Std', path, @posix_tz_parser) + assert_equal('Ignore/Std', info.identifier) + + assert_period(:LMT, 7142, 0, false, nil, Time.utc(1971, 1, 2, 2, 0, 0) - 7142, info) + assert_period(:XST, 7200, 0, false, Time.utc(1971, 1, 2, 2, 0, 0) - 7142, Time.utc(1981, 4, 10, 1, 0, 0) - 7200, info) + assert_period(:XDT, 7200, 3600, true, Time.utc(1981, 4, 10, 1, 0, 0) - 7200, Time.utc(1981, 10, 27, 2, 0, 0) - 10800, info) + assert_period(:XST, 7200, 0, false, Time.utc(1981, 10, 27, 2, 0, 0) - 10800, Time.utc(1982, 4, 10, 1, 0, 0) - 7200, info) + assert_period(:XDT, 7200, 3600, true, Time.utc(1982, 4, 10, 1, 0, 0) - 7200, Time.utc(1982, 10, 27, 2, 0, 0) - 10800, info) + + 1983.upto(generate_up_to).each do |year| + assert_period(:XST, 7200, 0, false, Time.utc(year - 1, 10, 27, 2, 0, 0) - 10800, Time.utc(year, 4, 11, 1, 0, 0) - 7200, info) + assert_period(:XDT, 7200, 3600, true, Time.utc(year, 4, 11, 1, 0, 0) - 7200, Time.utc(year, 10, 27, 2, 0, 0) - 10800, info) + end + + assert_period(:XST, 7200, 0, false, Time.utc(generate_up_to, 10, 27, 2, 0, 0) - 10800, nil, info) + end + end + + def test_load_tz_string_specifies_transition_to_offset_of_final_transition_same_year_skip_dst_end + # TZInfo v1.2.8 considered this to be an error. However, this is a valid + # situation with Africa/Casablanca in 2018e. + # + # The last defined transitions are: + # At 2037-03-29 02:00Z change to WEST UTC+1 + # At 2037-10-04 02:00Z change to WET UTC+0 + # + # The rules define the end of DST to be at 03:00 local time on the last + # Sunday of October (2037-10-31). This later transition needs to be + # ignored. + + offsets = [ + {:gmtoff => 7142, :isdst => false, :abbrev => 'LMT'}, + {:gmtoff => 7200, :isdst => false, :abbrev => 'XST'}, + {:gmtoff => 10800, :isdst => true, :abbrev => 'XDT'} + ] + + transitions = [ + {:at => Time.utc(1971, 1, 2, 2, 0, 0) - 7142, :offset_index => 1}, + {:at => Time.utc(1981, 4, 10, 1, 0, 0) - 7200, :offset_index => 2}, + {:at => Time.utc(1981, 10, 27, 2, 0, 0) - 10800, :offset_index => 1} + ] + + rules = AnnualRules.new( + TimezoneOffset.new(7200, 0, 'XST'), + TimezoneOffset.new(7200, 3600, 'XDT'), + JulianDayOfYearTransitionRule.new(100, 3600), + JulianDayOfYearTransitionRule.new(301, 7200) + ) + + generate_up_to = ZoneinfoTimezoneInfo::GENERATE_UP_TO + tzif_test(offsets, transitions, :rules => rules) do |path, format| - error = assert_raises(InvalidZoneinfoFile) { ZoneinfoTimezoneInfo.new('Invalid/Offset', path, @posix_tz_parser) } - assert_equal("The first offset indicated by the POSIX-style TZ string did not match the final defined offset in file '#{path}'.", error.message) + info = ZoneinfoTimezoneInfo.new('Ignore/Std', path, @posix_tz_parser) + assert_equal('Ignore/Std', info.identifier) + + assert_period(:LMT, 7142, 0, false, nil, Time.utc(1971, 1, 2, 2, 0, 0) - 7142, info) + assert_period(:XST, 7200, 0, false, Time.utc(1971, 1, 2, 2, 0, 0) - 7142, Time.utc(1981, 4, 10, 1, 0, 0) - 7200, info) + assert_period(:XDT, 7200, 3600, true, Time.utc(1981, 4, 10, 1, 0, 0) - 7200, Time.utc(1981, 10, 27, 2, 0, 0) - 10800, info) + assert_period(:XST, 7200, 0, false, Time.utc(1981, 10, 27, 2, 0, 0) - 10800, Time.utc(1982, 4, 10, 1, 0, 0) - 7200, info) + + 1982.upto(generate_up_to - 1).each do |year| + assert_period(:XDT, 7200, 3600, true, Time.utc(year, 4, 10, 1, 0, 0) - 7200, Time.utc(year, 10, 28, 2, 0, 0) - 10800, info) + assert_period(:XST, 7200, 0, false, Time.utc(year, 10, 28, 2, 0, 0) - 10800, Time.utc(year + 1, 4, 10, 1, 0, 0) - 7200, info) + end + + assert_period(:XDT, 7200, 3600, true, Time.utc(generate_up_to, 4, 10, 1, 0, 0) - 7200, Time.utc(generate_up_to, 10, 28, 2, 0, 0) - 10800, info) + assert_period(:XST, 7200, 0, false, Time.utc(generate_up_to, 10, 28, 2, 0, 0) - 10800, nil, info) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tzinfo.gemspec new/tzinfo.gemspec --- old/tzinfo.gemspec 2020-11-08 12:59:45.000000000 +0100 +++ new/tzinfo.gemspec 2020-12-16 21:32:03.000000000 +0100 @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'tzinfo' - s.version = '1.2.8' + s.version = '1.2.9' s.summary = 'Daylight savings aware timezone library' s.description = 'TZInfo provides daylight savings aware transformations between times in different time zones.' s.author = 'Philip Ross'
