What were you trying to do that didn't work?
TL;DR
The tzdata package provided in Centos 8 has additional transitions in a variety of zoneinfo files that are invalid.
Europe/London is an example where there is a transition from GMT -> GMT -> BST. This is impossible as you can only transition from GMT -> BST -> GMT.
When I compare the total number of transitions in el8 vs el9 there is 2 extra transitions.
1 for LMT (local mean time) which can be there but is not necessary. (Ok to be there).
1 extra transition for GMT -> GMT which is invalid.
Full list of zones with invalid transitions detected in el8 package:
Africa/Ceuta
America/Barbados
America/Matamoros
America/Monterrey
America/Rainy_River
America/Winnipeg
Antarctica/Macquarie
Arctic/Longyearbyen
Asia/Baku
Asia/Gaza
Asia/Hebron
Asia/Istanbul
Asia/Samarkand
Asia/Tashkent
Asia/Tbilisi
Asia/Yerevan
Atlantic/Jan_Mayen
Australia/ACT
Australia/Adelaide
Australia/Brisbane
Australia/Broken_Hill
Australia/Canberra
Australia/Currie
Australia/Eucla
Australia/Hobart
Australia/Lindeman
Australia/Melbourne
Australia/NSW
Australia/Perth
Australia/Queensland
Australia/South
Australia/Sydney
Australia/Tasmania
Australia/Victoria
Australia/West
Australia/Yancowinna
Canada/Central
Eire
Etc/GMT+1
Etc/GMT-1
Etc/GMT+10
Etc/GMT-10
Etc/GMT+11
Etc/GMT-11
Etc/GMT+12
Etc/GMT-12
Etc/GMT-13
Etc/GMT-14
Etc/GMT+2
Etc/GMT-2
Etc/GMT+3
Etc/GMT-3
Etc/GMT+4
Etc/GMT-4
Etc/GMT+5
Etc/GMT-5
Etc/GMT+6
Etc/GMT-6
Etc/GMT+7
Etc/GMT-7
Etc/GMT+8
Etc/GMT-8
Etc/GMT+9
Etc/GMT-9
Europe/Amsterdam
Europe/Belfast
Europe/Belgrade
Europe/Berlin
Europe/Bratislava
Europe/Brussels
Europe/Bucharest
Europe/Budapest
Europe/Chisinau
Europe/Copenhagen
Europe/Dublin
Europe/Guernsey
Europe/Isle_of_Man
Europe/Istanbul
Europe/Jersey
Europe/Kiev
Europe/Kyiv
Europe/Ljubljana
Europe/London
Europe/Luxembourg
Europe/Madrid
Europe/Minsk
Europe/Oslo
Europe/Podgorica
Europe/Prague
Europe/Riga
Europe/Rome
Europe/San_Marino
Europe/Sarajevo
Europe/Simferopol
Europe/Skopje
Europe/Sofia
Europe/Stockholm
Europe/Tallinn
Europe/Tiraspol
Europe/Uzhgorod
Europe/Vatican
Europe/Vienna
Europe/Vilnius
Europe/Warsaw
Europe/Zagreb
Europe/Zaporozhye
GB
GB-Eire
Pacific/Norfolk
Poland
Turkey
Raw Data of an invalid transition for Europe/London:
Perl script to reproduce this issue:
-
- Note first explode el8 and el9 rpm into the same directory into usr_el8 and usr_el9 for comparison **
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
use Test::Deep;
use Time::Tzfile;
my @zones = ("Europe/London");
open(my $fh,"> el8.out");
open(my $hh,"> el9.out");
foreach my $zone (@zones) {
print $zone . "\n";
# get an unassembled raw parse of the file
my $tzdata_el8 = Time::Tzfile->parse(
{ filename => 'usr_el8/share/zoneinfo/' . $zone });print $fh Dumper($tzdata_el8);
my $tzdata_el9 = Time::Tzfile->parse({ filename => 'usr_el9/share/zoneinfo/' . $zone });
print $hh Dumper($tzdata_el9);
my @el8_types = ();
foreach my $json (@{$tzdata_el8}) { push @el8_types, $json->\{'type'};
}
my @el9_types = ();
foreach my $json (@{$tzdata_el9}) { push @el9_types, $json->\{'type'};
}
my $el8_count = scalar(@el8_types);
my $el9_count = scalar(@el9_types);
cmp_deeply($el8_count, $el9_count);
cmp_deeply(@el8_types, @el9_types);
}
close $fh;
close $hh;
h3. Please provide the package NVR for which bug is seen:
h3. How reproducible:
h3. Dump the Europe/London zoneinfo file for both el8 and el9 and compare.
Perl script to reproduce this issue. Will produce two output files for el8 and el9.
** Note first explode el8 and el9 rpm into the same directory into usr_el8 and usr_el9 for comparison **
#!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
use Test::Deep;
use Time::Tzfile;
my @zones = ("Europe/London");
open(my $fh,"> el8.out");
open(my $hh,"> el9.out");
foreach my $zone (@zones) {
print $zone . "\n";
# get an unassembled raw parse of the file
my $tzdata_el8 = Time::Tzfile->parse({ filename => 'usr_el8/share/zoneinfo/' . $zone }
);
print $fh Dumper($tzdata_el8);
my $tzdata_el9 = Time::Tzfile->parse(
{ filename => 'usr_el9/share/zoneinfo/' . $zone });
print $hh Dumper($tzdata_el9);
my @el8_types = ();
foreach my $json (@{$tzdata_el8})
{ push @el8_types, $json->\{'type'};
}
my @el9_types = ();
foreach my $json (@{$tzdata_el9})
{ push @el9_types, $json->\{'type'};
}
my $el8_count = scalar(@el8_types);
my $el9_count = scalar(@el9_types);
cmp_deeply($el8_count, $el9_count);
cmp_deeply(@el8_types, @el9_types);
}
close $fh;
close $hh;
Steps to reproduce
- Download el8 and el9 rpm package and explode contents in usr_el8 and usr_el9
- Install required libraries:
cpan install Time::Tzfile cpan install Test::Deep
- Run the above perl script
- Compare the el8.out and el9.out output files
See duplicates only found in el8 for Europe/London:
{ 'type' => 'BST', 'offset' => 3600, 'epoch' => 796179600, 'is_dst' => 1 }
,
{ 'type' => 'GMT', 'is_dst' => 0, 'offset' => 0, 'epoch' => 814323600 }
,
{ 'offset' => 0, 'epoch' => 820454400, 'is_dst' => 0, 'type' => 'GMT' }
,
{ 'type' => 'BST', 'is_dst' => 1, 'epoch' => 828234000, 'offset' => 3600 }
,
Note the invalid transition GMT -> GMT which does not appear in the el9 file.
Repeat this process for the full list of zoneinfo files that have the same problem:
Africa/Ceuta
America/Barbados
America/Matamoros
America/Monterrey
America/Rainy_River
America/Winnipeg
Antarctica/Macquarie
Arctic/Longyearbyen
Asia/Baku
Asia/Gaza
Asia/Hebron
Asia/Istanbul
Asia/Samarkand
Asia/Tashkent
Asia/Tbilisi
Asia/Yerevan
Atlantic/Jan_Mayen
Australia/ACT
Australia/Adelaide
Australia/Brisbane
Australia/Broken_Hill
Australia/Canberra
Australia/Currie
Australia/Eucla
Australia/Hobart
Australia/Lindeman
Australia/Melbourne
Australia/NSW
Australia/Perth
Australia/Queensland
Australia/South
Australia/Sydney
Australia/Tasmania
Australia/Victoria
Australia/West
Australia/Yancowinna
Canada/Central
Eire
Etc/GMT+1
Etc/GMT-1
Etc/GMT+10
Etc/GMT-10
Etc/GMT+11
Etc/GMT-11
Etc/GMT+12
Etc/GMT-12
Etc/GMT-13
Etc/GMT-14
Etc/GMT+2
Etc/GMT-2
Etc/GMT+3
Etc/GMT-3
Etc/GMT+4
Etc/GMT-4
Etc/GMT+5
Etc/GMT-5
Etc/GMT+6
Etc/GMT-6
Etc/GMT+7
Etc/GMT-7
Etc/GMT+8
Etc/GMT-8
Etc/GMT+9
Etc/GMT-9
Europe/Amsterdam
Europe/Belfast
Europe/Belgrade
Europe/Berlin
Europe/Bratislava
Europe/Brussels
Europe/Bucharest
Europe/Budapest
Europe/Chisinau
Europe/Copenhagen
Europe/Dublin
Europe/Guernsey
Europe/Isle_of_Man
Europe/Istanbul
Europe/Jersey
Europe/Kiev
Europe/Kyiv
Europe/Ljubljana
Europe/London
Europe/Luxembourg
Europe/Madrid
Europe/Minsk
Europe/Oslo
Europe/Podgorica
Europe/Prague
Europe/Riga
Europe/Rome
Europe/San_Marino
Europe/Sarajevo
Europe/Simferopol
Europe/Skopje
Europe/Sofia
Europe/Stockholm
Europe/Tallinn
Europe/Tiraspol
Europe/Uzhgorod
Europe/Vatican
Europe/Vienna
Europe/Vilnius
Europe/Warsaw
Europe/Zagreb
Europe/Zaporozhye
GB
GB-Eire
Pacific/Norfolk
Poland
Turkey
Expected results
Transitions in the el8 zoneinfo files should be valid and only contain transitions that are accurate e.g. GMT -> BST -> GMT not GMT -> GMT -> BST.
Actual results
Transitions are invalid in the el8 zoneinfo files listed above and contain extra transitions that are not found in the el9 package.