Hello,
I've installed DateTime::TimeZone 0.2503 from CPAN under the Perl
5.8.1 and noticed the following glitches, which are fixed in the patch
below and described in Changes.
Please apply something along the lines of the attached patch.
Thank you,
diff -ruN --exclude *~ DateTime-TimeZone-0.2503.orig/Changes
DateTime-TimeZone-0.2503/Changes
--- DateTime-TimeZone-0.2503.orig/Changes Mon Oct 6 22:04:19 2003
+++ DateTime-TimeZone-0.2503/Changes Thu Oct 9 14:56:07 2003
@@ -1,3 +1,11 @@
+0.2503-alexm:w-m.ru 2003-10-09
+
+- Add dependency on DateTime;
+
+- Show more details on _why_ the timezone name is "invalid";
+
+- Clarify the meaning of $datetime argument;
+
0.2503 2003-10-06
- Made the offset string -> number conversion slightly less strict, so
diff -ruN --exclude *~ DateTime-TimeZone-0.2503.orig/Build.PL
DateTime-TimeZone-0.2503/Build.PL
--- DateTime-TimeZone-0.2503.orig/Build.PL Tue Sep 9 20:35:20 2003
+++ DateTime-TimeZone-0.2503/Build.PL Thu Oct 9 14:52:20 2003
@@ -26,6 +26,7 @@
license => 'perl',
requires => { 'Params::Validate' => 0,
'Class::Singleton' => 1.03,
+ 'DateTime' => 0,
},
sign => 1,
)->create_build_script;
diff -ruN --exclude *~ DateTime-TimeZone-0.2503.orig/lib/DateTime/TimeZone.pm
DateTime-TimeZone-0.2503/lib/DateTime/TimeZone.pm
--- DateTime-TimeZone-0.2503.orig/lib/DateTime/TimeZone.pm Mon Oct 6 21:51:52
2003
+++ DateTime-TimeZone-0.2503/lib/DateTime/TimeZone.pm Thu Oct 9 14:55:37 2003
@@ -66,7 +66,7 @@
my $real_class = "DateTime::TimeZone::$subclass";
eval "require $real_class";
- die "Invalid time zone name: $p{name}" if $@;
+ die "Invalid time zone name: $p{name}\n$@" if $@;
return $real_class->instance( name => $p{name}, is_olson => 1 );
}
@@ -406,10 +406,14 @@
=head1 SYNOPSIS
+ use DateTime;
use DateTime::TimeZone
my $tz = DateTime::TimeZone->new( name => 'America/Chicago' );
+ my $datetime = DateTime->now();
+ my $offset = $tz->offset_for_datetime($datetime);
+
=head1 DESCRIPTION
This class is the base class for all time zone objects. A time zone
@@ -486,7 +490,8 @@
=head2 Object Methods
-C<DateTime::TimeZone> objects provide the following methods:
+C<DateTime::TimeZone> objects provide the following methods ($datetime
+is assumed to be an instance of DateTime class):
=over 4
--alexm