[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#690908: unblock: libdatetime-timezone-perl/1.51-1+2012g



Control: retitle -1 unblock: libdatetime-timezone-perl/1.53-1+2012i

> Please unblock package libdatetime-timezone-perl 1.51-1+2012g.
> 
> This release contains the data from version 2012g of the Olson
> database (and some other minor changes).
> 
> I'm attaching the debdiff against 1.49-1+2012f modulo the boring changes
> in the tzdata-generated files.
> 
> unblock libdatetime-timezone-perl/1.51-1+2012g

unblock libdatetime-timezone-perl/1.53-1+2012i

I've uploaded 1.53-1+2012i now to unstable with the changes from the
Olson db (2012h and) 2012i.

New debdiff against the version in testing attached (without the
perlified tzdata).


Cheers,
gregor

-- 
 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Ani Difranco: Small World
diff --git a/Changes b/Changes
index 7f01a41..7ad9932 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,38 @@
+1.53    2012-11-03
+
+- This release is based on version 2012i of the Olson database. This release
+  includes contemporary changes for Cuba.
+
+
+1.52    2012-10-31
+
+- This release is based on version 2012h of the Olson database. This release
+  includes contemporary changes for Brazil, Israel, and Jordan.
+
+
+1.51    2012-10-18
+
+- This release is based on version 2012g of the Olson database. This release
+  includes contemporary changes for Palestine and Samoa.
+
+
+1.50    2012-09-16
+
+- In scalar context, DateTime::TimeZone->names_in_category returned an
+  arrayref containing an arrayref (rather than _just_ an arrayref). Reported
+  by Ed Shrock. RT #76791.
+
+- The DateTime::TimeZone->names_in_category claimed that it returned names
+  based on the population of the zone. I don't think this was ever true, but
+  this data is definitely not part of the current Olson database. Reported by
+  Ed Shrock. RT #76792.
+
+  However, the DateTime::TimeZone->names_in_country method does preserve the
+  order specified in the Olson database, which is sort of based on population
+  and geography. This method is probably the best choice for presenting a list
+  of names to end user.
+
+
 1.49    2012-09-13
 
 - This release is based on version 2012f of the Olson database. This release
diff --git a/LICENSE b/LICENSE
index 5ab5d4c..b2d7192 100644
--- a/LICENSE
+++ b/LICENSE
@@ -22,7 +22,7 @@ This is free software, licensed under:
                      Version 1, February 1989
 
  Copyright (C) 1989 Free Software Foundation, Inc.
-                    51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 51 Franklin St, Suite 500, Boston, MA  02110-1335  USA
 
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
diff --git a/MANIFEST b/MANIFEST
index 508c2f2..d29f6a4 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -451,7 +451,6 @@ t/20local-subclass.t
 t/21stack-corruption.t
 t/check_datetime_version.pl
 t/release-eol.t
-t/release-no-tabs.t
 t/release-pod-coverage.t
 t/release-pod-linkcheck.t
 t/release-pod-spell.t
diff --git a/META.json b/META.json
index 4e0d85a..379386c 100644
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
       "Dave Rolsky <autarch@urth.org>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "Dist::Zilla version 4.300021, CPAN::Meta::Converter version 2.120921",
+   "generated_by" : "Dist::Zilla version 4.300028, CPAN::Meta::Converter version 2.120921",
    "license" : [
       "perl_5"
    ],
@@ -19,6 +19,11 @@
             "ExtUtils::MakeMaker" : "6.30"
          }
       },
+      "develop" : {
+         "requires" : {
+            "Test::Pod" : "1.41"
+         }
+      },
       "runtime" : {
          "requires" : {
             "Class::Load" : "0",
@@ -62,6 +67,6 @@
          "web" : "http://git.urth.org/DateTime-TimeZone.git";
       }
    },
-   "version" : "1.49"
+   "version" : "1.53"
 }
 
diff --git a/META.yml b/META.yml
index c479b42..bec8805 100644
--- a/META.yml
+++ b/META.yml
@@ -13,7 +13,7 @@ build_requires:
 configure_requires:
   ExtUtils::MakeMaker: 6.30
 dynamic_config: 1
-generated_by: 'Dist::Zilla version 4.300021, CPAN::Meta::Converter version 2.120921'
+generated_by: 'Dist::Zilla version 4.300028, CPAN::Meta::Converter version 2.120921'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -38,4 +38,4 @@ requires:
 resources:
   bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=DateTime-TimeZone
   repository: git://git.urth.org/DateTime-TimeZone.git
-version: 1.49
+version: 1.53
diff --git a/Makefile.PL b/Makefile.PL
index ff6e3c6..523da0d 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -43,7 +43,7 @@ my %WriteMakefileArgs = (
     "vars" => 0,
     "warnings" => 0
   },
-  "VERSION" => "1.49",
+  "VERSION" => "1.53",
   "test" => {
     "TESTS" => "t/*.t"
   }
@@ -67,11 +67,11 @@ delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
   unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
 
 if ( $^O eq 'MSWin32' ) {
-  $WriteMakefileArgs{PREREQ_PM}{'Win32::TieRegistry'} = '0';
+	$WriteMakefileArgs{PREREQ_PM}{'Win32::TieRegistry'} = '0';
 }
 
 if ( $^O eq 'hpux' ) {
-  $WriteMakefileArgs{PREREQ_PM}{'DateTime::TimeZone::HPUX'} = '0';
+	$WriteMakefileArgs{PREREQ_PM}{'DateTime::TimeZone::HPUX'} = '0';
 }
 
 WriteMakefile(%WriteMakefileArgs);
diff --git a/README b/README
index 7e1ef03..7e76fb6 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 
 
 This archive contains the distribution DateTime-TimeZone,
-version 1.49:
+version 1.53:
 
   Time zone object base class and factory
 
diff --git a/debian/changelog b/debian/changelog
index bace26f..721a9db 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
+libdatetime-timezone-perl (1:1.53-1+2012i) unstable; urgency=low
+
+  * New upstream release, based on version 2012i of the Olson database.
+
+ -- gregor herrmann <gregoa@debian.org>  Wed, 07 Nov 2012 18:00:41 +0100
+
+libdatetime-timezone-perl (1:1.51-1+2012g) unstable; urgency=low
+
+  * New upstream release, based on version 2012g of the Olson database.
+
+ -- gregor herrmann <gregoa@debian.org>  Fri, 19 Oct 2012 02:46:13 +0200
+
 libdatetime-timezone-perl (1:1.49-1+2012f) unstable; urgency=low
 
   * New upstream release, based on version 2012f of the Olson database.
diff --git a/dist.ini b/dist.ini
index ecafc5f..5dc23d9 100644
--- a/dist.ini
+++ b/dist.ini
@@ -3,7 +3,7 @@ author  = Dave Rolsky <autarch@urth.org>
 license = Perl_5
 copyright_holder = Dave Rolsky
 
-version = 1.49
+version = 1.53
 
 [NextRelease]
 format = %-7v %{yyyy-MM-dd}d
@@ -30,7 +30,7 @@ repository.type   = git
 [PkgVersion]
 
 [EOLTests]
-[NoTabsTests]
+;[NoTabsTests]
 [PodSyntaxTests]
 ;[Test::CPAN::Changes]
 [Test::Pod::LinkCheck]
diff --git a/t/15catalog.t b/t/15catalog.t
index 90bd44a..2246253 100644
--- a/t/15catalog.t
+++ b/t/15catalog.t
@@ -58,6 +58,10 @@ use DateTime::TimeZone;
 
     my $names = DateTime::TimeZone::names_in_category('America');
     ok( ref $names, 'names_in_category() returns ref in scalar context' );
+    is_deeply(
+        \@names, $names,
+        'names_in_category() returns same values in list and scalar context'
+    );
 }
 
 {
diff --git a/t/release-no-tabs.t b/t/release-no-tabs.t
deleted file mode 100644
index 1c7204e..0000000
--- a/t/release-no-tabs.t
+++ /dev/null
@@ -1,16 +0,0 @@
-
-BEGIN {
-  unless ($ENV{RELEASE_TESTING}) {
-    require Test::More;
-    Test::More::plan(skip_all => 'these tests are for release candidate testing');
-  }
-}
-
-use strict;
-use warnings;
-use Test::More;
-
-eval 'use Test::NoTabs';
-plan skip_all => 'Test::NoTabs required' if $@;
-
-all_perl_files_ok();
diff --git a/t/release-pod-spell.t b/t/release-pod-spell.t
index faf607d..7594c2c 100644
--- a/t/release-pod-spell.t
+++ b/t/release-pod-spell.t
@@ -35,6 +35,7 @@ AE
 AO
 API
 AQ
+Aland
 BD
 BG
 BH
@@ -51,7 +52,9 @@ Burkina
 CN
 CPAN
 CX
+CY
 Caicos
+Costa
 Cunha
 DK
 DM
@@ -59,6 +62,7 @@ Darussalam
 DateTime
 EE
 EG
+El
 Eustatius
 FI
 FJ
@@ -86,11 +90,14 @@ JM
 Jamahiriya
 KE
 KH
+KI
 KZ
 Kitts
 LK
 LV
+LY
 Lanka
+Leone
 Leste
 MF
 MH
@@ -118,6 +125,7 @@ QA
 RO
 RW
 Rata
+Rica
 Rolsky
 SG
 SL
@@ -125,10 +133,12 @@ SV
 SX
 SY
 SZ
+Saba
 Sao
 Sint
 Sri
 Storable
+Subclass
 TF
 TG
 TJ
@@ -163,4 +173,6 @@ da
 datetime
 env
 pre
+subclasses
+timezones
 versa
diff --git a/tools/parse_olson b/tools/parse_olson
index 4d457d7..f9597ed 100755
--- a/tools/parse_olson
+++ b/tools/parse_olson
@@ -9,12 +9,14 @@ use lib './lib';
 BEGIN { $DateTime::TimeZone::VERSION = '1.24' }
 
 use Data::Dumper;
+use DateTime;
 use DateTime::TimeZone::OlsonDB;
 use File::Copy;
 use File::Find::Rule;
 use File::Path;
 use File::Spec;
 use Getopt::Long;
+use List::AllUtils qw( max );
 use Locale::Country 3.11 qw( code2country );
 
 $Data::Dumper::Indent   = 1;
@@ -169,8 +171,13 @@ sub parse_file {
         ( my $mod_name = $zone_name ) =~ s/\//::/g;
         $mod_name =~ tr/-/_/;
 
-        my $max_year = (localtime)[5] + 1910;
-        my $zone     = $odb->expanded_zone(
+        my $zone     = $odb->zone($zone_name);
+        my $max_year = max(
+            (localtime)[5] + 1910,
+            $zone->last_rules_year($odb),
+        );
+
+        $zone = $odb->expanded_zone(
             name           => $zone_name,
             expand_to_year => $max_year,
         );
@@ -322,15 +329,48 @@ sub serialize_span {
     my $span = shift;
 
     # must correspond to constants in DT::TZ, and short_name is always last
-    my @keys   = qw( utc_start utc_end local_start local_end offset is_dst );
     my $string = "    [\n";
-    $string .= join ",\n", @$span{@keys};
-    $string .= ",\n'$span->{short_name}'";
+    for my $key (qw( utc_start utc_end local_start local_end )) {
+        my $comment = sprintf( '# %12s %s', $key, _num_as_datetime( $span->{$key} ) );
+        $comment =~ s/\s+$//;
+        $string .= "$span->{$key}, $comment\n";
+    }
+
+    for my $key (qw( offset is_dst )) {
+        $string .= "$span->{$key},\n";
+    }
+
+    $string .= "'$span->{short_name}',";
     $string .= "\n    ],";
 
     return $string;
 }
 
+{
+    {
+        package FakeCal;
+
+        sub utc_rd_values {
+            return @{ $_[0] };
+        }
+    }
+
+    sub _num_as_datetime {
+        my $num = shift;
+
+        return q{} unless $num =~ /^\d+$/;
+
+        my $days = do { use integer; $num / 86400 };
+        my $secs = $num % 86400;
+
+        my $obj = bless [ $days, $secs, 0 ], 'FakeCal';
+
+        my $dt = DateTime->from_object( object => $obj );
+
+        return $dt->strftime( '%Y-%m-%d %H:%M:%S (%a)' );
+    }
+}
+
 sub zone_generator {
     my $zone = shift;
 
@@ -431,7 +471,7 @@ sub make_catalog_pm {
         $countries .= qq|  '\L$c' => [ qw(\n|;
 
         # We explicitly do not sort these because the order in
-        # zones.tab is by population.
+        # zones.tab is already in a sane sort order.
         $countries .= join "\n",
             map {"    $_"} map { $_->[0] } @{ $countries{$c} };
         $countries .= "\n) ],\n";
@@ -527,8 +567,7 @@ EOF
 
         $zonecatalog .= "=head3 $country->[0] ($country->[1])\n\n";
 
-        for my $zone ( sort { lc $a->[0] cmp lc $b->[0] }
-            @{ $countries{ $country->[1] } } ) {
+        for my $zone ( @{ $countries{ $country->[1] } } ) {
             my $line = join ' - ', grep { defined } @{$zone};
             $zonecatalog .= "  $line\n";
         }

Attachment: signature.asc
Description: Digital signature


Reply to: