Hello community,

here is the log from the commit of package perl-Time-modules for 
openSUSE:Factory
checked in at Wed May 18 17:18:46 CEST 2011.



--------
--- perl-Time-modules/perl-Time-modules.changes 2010-11-30 20:29:22.000000000 
+0100
+++ /mounts/work_src_done/STABLE/perl-Time-modules/perl-Time-modules.changes    
2011-05-18 13:42:13.000000000 +0200
@@ -1,0 +2,20 @@
+Wed May 18 09:54:57 UTC 2011 - [email protected]
+
+- update to 2011.0517
+       Bugfix from Sophie Hamilton: call tzset() when changing timezones.
+       Bugfix: bail out of tests cleanly when tzset doesn't work.
+- license changed
+
+-------------------------------------------------------------------
+Fri May 13 10:25:15 UTC 2011 - [email protected]
+
+- update to 2011.0505
+       Bugfix: make sure $ampm is defined so no undefined string warnings
+       are issued.
+       Honor the GMT flag when parsing time specs.  Patch from
+       kris at shannon.id.au.
+       Bugfix: RT#31477 noon & midnight would match in the middle of strings.
+       Added %v conversion for Time::CTime
+       Added tests to disprove invalid bug reports.
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
  Time-modules-2006.0814.tar.bz2

New:
----
  Time-modules-2011.0517.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Time-modules.spec ++++++
--- /var/tmp/diff_new_pack.Tg5cKE/_old  2011-05-18 17:18:28.000000000 +0200
+++ /var/tmp/diff_new_pack.Tg5cKE/_new  2011-05-18 17:18:28.000000000 +0200
@@ -1,7 +1,7 @@
 #
-# spec file for package perl-Time-modules (Version 2006.0814)
+# spec file for package perl-Time-modules
 #
-# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,12 +19,12 @@
 
 
 Name:           perl-Time-modules
-Version:        2006.0814
-Release:        133
+Version:        2011.0517
+Release:        1
 AutoReqProv:    on
 Group:          Development/Libraries/Perl
 Url:            http://www.cpan.org/modules/by-module/Time/
-License:        PERMISSIVE-OSI-COMPLIANT
+License:        Freely redistributable without restriction
 Summary:        Various Perl time modules
 Source:         Time-modules-%{version}.tar.bz2
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
@@ -47,6 +47,8 @@
 %build
 perl Makefile.PL
 make %{?_smp_mflags}
+
+%check
 make test
 
 %install

++++++ Time-modules-2006.0814.tar.bz2 -> Time-modules-2011.0517.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Time-modules-2006.0814/CHANGELOG 
new/Time-modules-2011.0517/CHANGELOG
--- old/Time-modules-2006.0814/CHANGELOG        2006-08-15 23:38:13.000000000 
+0200
+++ new/Time-modules-2011.0517/CHANGELOG        2011-05-17 17:42:47.000000000 
+0200
@@ -1,3 +1,19 @@
+2011.0517:
+       Bugfix from Sophie Hamilton: call tzset() when changing timezones.
+
+       Bugfix: bail out of tests cleanly when tzset doesn't work.
+2011.0505:
+       Bugfix: make sure $ampm is defined so no undefined string warnings
+       are issued.
+
+       Honor the GMT flag when parsing time specs.  Patch from
+       kris at shannon.id.au.
+
+       Bugfix: RT#31477 noon & midnight would match in the middle of strings.
+
+       Added %v conversion for Time::CTime
+
+       Added tests to disprove invalid bug reports.
 2006.0814:
        A bugfix for negative offsets that overflowed (from Vernon Lyon 
        <vlyon at uk.yahoo-inc.com>)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Time-modules-2006.0814/MANIFEST 
new/Time-modules-2011.0517/MANIFEST
--- old/Time-modules-2006.0814/MANIFEST 2006-08-15 23:38:59.000000000 +0200
+++ new/Time-modules-2011.0517/MANIFEST 2011-05-06 06:30:04.000000000 +0200
@@ -8,4 +8,7 @@
 lib/Time/ParseDate.pm
 lib/Time/Timezone.pm
 t/datetime.t
+t/metdate.t
+t/order1.t
+t/order2.t
 META.yml                                 Module meta-data (added by MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Time-modules-2006.0814/META.yml 
new/Time-modules-2011.0517/META.yml
--- old/Time-modules-2006.0814/META.yml 2006-08-15 23:39:54.000000000 +0200
+++ new/Time-modules-2011.0517/META.yml 2011-05-17 17:43:34.000000000 +0200
@@ -1,10 +1,23 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         Time-modules
-version:      2006.0814
-version_from: lib/Time/ParseDate.pm
-installdirs:  site
-requires:
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.21
+--- #YAML:1.0
+name:               Time-modules
+version:            2011.0517
+abstract:           Parse and format time values
+author:
+    - David Muir Sharnoff <[email protected]>
+license:            unknown
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
+requires:  {}
+resources:
+    repository:  http://github.com/muir/Time-modules
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.56
+meta-spec:
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Time-modules-2006.0814/Makefile.PL 
new/Time-modules-2011.0517/Makefile.PL
--- old/Time-modules-2006.0814/Makefile.PL      2006-08-15 23:39:48.000000000 
+0200
+++ new/Time-modules-2011.0517/Makefile.PL      2011-05-05 17:52:11.000000000 
+0200
@@ -2,10 +2,20 @@
 use ExtUtils::MakeMaker;
 
 WriteMakefile( 
-       'VERSION_FROM' => 'lib/Time/ParseDate.pm',
-       'NAME' => 'Time-modules',
-       ($] >= 5.005 ?
-           ('ABSTRACT' => 'Parse and format time values',
-            'AUTHOR'   => 'David Muir Sharnoff <[email protected]>') : ()),
-       'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" },
-       );
+       VERSION_FROM => 'lib/Time/ParseDate.pm',
+       NAME =>         'Time-modules',
+       ($] >= 5.005 
+               ?       
+                       (
+                               ABSTRACT        => 'Parse and format time 
values',
+                               AUTHOR          => 'David Muir Sharnoff 
<[email protected]>',
+                               META_MERGE     => {
+                                       resources  => {
+                                               repository => 
'http://github.com/muir/Time-modules',
+                                       },
+                               },
+                       ) 
+               : ()
+       ),
+       dist => {       COMPRESS=>"gzip", SUFFIX=>"gz" },
+);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Time-modules-2006.0814/lib/Time/CTime.pm 
new/Time-modules-2011.0517/lib/Time/CTime.pm
--- old/Time-modules-2006.0814/lib/Time/CTime.pm        2004-02-08 
23:48:17.000000000 +0100
+++ new/Time-modules-2011.0517/lib/Time/CTime.pm        2011-05-12 
04:38:36.000000000 +0200
@@ -16,7 +16,7 @@
 use vars qw(@DoW @DayOfWeek @MoY @MonthOfYear %strftime_conversion $VERSION);
 use vars qw($template $sec $min $hour $mday $mon $year $wday $yday $isdst);
 
-$VERSION = 99.06_22_01;
+$VERSION = 2011.0505;
 
 CONFIG: {
     @DoW =        qw(Sun Mon Tue Wed Thu Fri Sat);
@@ -54,6 +54,7 @@
        't',    sub { "\t" },
        'T',    sub { sprintf("%02d:%02d:%02d", $hour, $min, $sec) },
        'U',    sub { wkyr(0, $wday, $yday) },
+       'v',    sub { sprintf("%2d-%s-%4d", $mday, $MoY[$mon], $year+1900) },
        'w',    sub { $wday },
        'W',    sub { wkyr(1, $wday, $yday) },
        'y',    sub { sprintf("%02d",$year%100) },
@@ -61,6 +62,7 @@
        'x',    sub { sprintf("%02d/%02d/%02d", $mon + 1, $mday, $year%100) },
        'X',    sub { sprintf("%02d:%02d:%02d", $hour, $min, $sec) },
        'Z',    sub { &tz2zone(undef,undef,$isdst) }
+       # z sprintf("%+03d%02d", $offset / 3600, ($offset % 3600)/60);
     );
 
 
@@ -115,7 +117,7 @@
     local ($template, $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, 
$isdst) = @_;
 
     undef $@;
-    $template =~ 
s/%([%aAbBcdDefFhHIjklmMnopQrRStTUwWxXyYZ])/&{$Time::CTime::strftime_conversion{$1}}()/egs;
+    $template =~ 
s/%([%aAbBcdDefFhHIjklmMnopQrRStTUvwWxXyYZ])/&{$Time::CTime::strftime_conversion{$1}}()/egs;
     die $@ if $@;
     return $template;
 }
@@ -154,7 +156,7 @@
        %j      day of the year
        %k      hour
        %l      hour, 12 hour clock
-       %m      month number, starting with 1
+       %m      month number, starting with 1, leading 0's
        %M      minute, leading 0's
        %n      NEWLINE
        %o      ornate day of month -- "1st", "2nd", "25th", etc.
@@ -165,6 +167,7 @@
        %t      TAB
        %T      time format: 21:05:57
        %U      week number, Sunday as first day of week
+       %v      DD-Mon-Year
        %w      day of the week, numerically, Sunday == 0
        %W      week number, Monday as first day of week
        %x      date format: 11/19/94
@@ -187,14 +190,16 @@
 
 =head1 GENESIS
 
-Written by David Muir Sharnoff <[email protected]>.
+Written by David Muir Sharnoff <[email protected]>.
 
 The starting point for this package was a posting by 
 Paul Foley <[email protected]> 
 
 =head1 LICENSE
 
-Copyright (C) 1996-1999 David Muir Sharnoff.  License hereby
+Copyright (C) 1996-2010 David Muir Sharnoff.  
+Copyright (C) 2011 Google, Inc.  
+License hereby
 granted for anyone to use, modify or redistribute this module at
-their own risk.  Please feed useful changes back to [email protected].
+their own risk.  Please feed useful changes back to [email protected].
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Time-modules-2006.0814/lib/Time/DaysInMonth.pm 
new/Time-modules-2011.0517/lib/Time/DaysInMonth.pm
--- old/Time-modules-2006.0814/lib/Time/DaysInMonth.pm  2005-04-26 
18:07:41.000000000 +0200
+++ new/Time-modules-2011.0517/lib/Time/DaysInMonth.pm  2008-04-01 
00:56:40.000000000 +0200
@@ -68,7 +68,7 @@
 
 =head1 AUTHOR
 
-David Muir Sharnoff <[email protected]>
+David Muir Sharnoff <[email protected]>
 
 =head1 BUGS
 
@@ -79,5 +79,5 @@
 
 Copyright (C) 1996-1999 David Muir Sharnoff.  License hereby
 granted for anyone to use, modify or redistribute this module at
-their own risk.  Please feed useful changes back to [email protected].
+their own risk.  Please feed useful changes back to [email protected].
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Time-modules-2006.0814/lib/Time/JulianDay.pm 
new/Time-modules-2011.0517/lib/Time/JulianDay.pm
--- old/Time-modules-2006.0814/lib/Time/JulianDay.pm    2004-02-08 
23:48:29.000000000 +0100
+++ new/Time-modules-2011.0517/lib/Time/JulianDay.pm    2011-05-06 
04:06:31.000000000 +0200
@@ -19,7 +19,7 @@
 # constants
 use vars qw($brit_jd $jd_epoch $jd_epoch_remainder $VERSION);
 
-$VERSION = 2003.1125;
+$VERSION = 2011.0505;
 
 # calculate the julian day, given $year, $month and $day
 sub julian_day
@@ -208,7 +208,7 @@
 
 =head1 GENESIS
 
-Written by David Muir Sharnoff <[email protected]> with help from
+Written by David Muir Sharnoff <[email protected]> with help from
 previous work by 
 Kurt Jaeger aka PI <[email protected]>
        based on postings from: Ian Miller <[email protected]>;
@@ -220,5 +220,5 @@
 
 Copyright (C) 1996-1999 David Muir Sharnoff.  License hereby
 granted for anyone to use, modify or redistribute this module at
-their own risk.  Please feed useful changes back to [email protected].
+their own risk.  Please feed useful changes back to [email protected].
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Time-modules-2006.0814/lib/Time/ParseDate.pm 
new/Time-modules-2011.0517/lib/Time/ParseDate.pm
--- old/Time-modules-2006.0814/lib/Time/ParseDate.pm    2006-08-15 
23:37:45.000000000 +0200
+++ new/Time-modules-2011.0517/lib/Time/ParseDate.pm    2011-05-17 
17:40:04.000000000 +0200
@@ -17,7 +17,7 @@
 # constants
 use vars qw(%mtable %umult %wdays $VERSION);
 
-$VERSION = 2006.0814;
+$VERSION = 2011.0517;
 
 # globals
 use vars qw($debug); 
@@ -255,7 +255,9 @@
                }
 
                print "relative date\n" if $debug;
-               $jd = local_julian_day($now);
+               $jd = $options{GMT}
+                       ? gm_julian_day($now)
+                       : local_julian_day($now);
                print "jd($now) = $jd\n" if $debug;
                $jd += $rd;
        } else {
@@ -368,8 +370,13 @@
        } else {
                unless ($options{GMT}) {
                        if ($options{ZONE}) {
-                               $tzadj = tz_offset($options{ZONE}, $secs);
+                               $tzadj = tz_offset($options{ZONE}, $secs) || 0;
                                $tzadj = tz_offset($options{ZONE}, 
$secs-$tzadj);
+                               unless (defined($tzadj)) {
+                                       return (undef, "could not convert 
'$options{ZONE}' to time offset")
+                                               if wantarray();
+                                       return undef;
+                               }
                                print "adjusting secs for $options{ZONE}: 
$tzadj\n" if $debug;
                                $secs -= $tzadj;
                        } else {
@@ -727,18 +734,18 @@
                        $$sr += $frac;
                }
                print "S = $$sr\n" if $debug;
-               $ampm = $4 || $9 || $11;
+               $ampm = $4 || $9 || $11 || '';
                $$tzr = $12;
                $$hr += 12 if $ampm and "\U$ampm" eq "PM" && $$hr != 12;
                $$hr = 0 if $$hr == 12 && "\U$ampm" eq "AM";
                printf "matched at %d, rem = %s.\n", __LINE__, $$tr if $debug;
                return 1;
-       } elsif ($$tr =~ s#noon(?:\s+|$ )##ix) {
+       } elsif ($$tr =~ s#^noon(?:\s+|$ )##ix) {
                # noon
                ($$hr, $$mr, $$sr) = (12, 0, 0);
                printf "matched at %d.\n", __LINE__ if $debug;
                return 1;
-       } elsif ($$tr =~ s#midnight(?:\s+|$ )##ix) {
+       } elsif ($$tr =~ s#^midnight(?:\s+|$ )##ix) {
                # midnight
                ($$hr, $$mr, $$sr) = (0, 0, 0);
                printf "matched at %d.\n", __LINE__ if $debug;
@@ -1275,13 +1282,11 @@
        ($seconds, $remaining) = parsedate("today is the day");
        ($seconds, $error) = parsedate("today is", WHOLE=>1);
 
-=head1 AUTHOR
-
-David Muir Sharnoff <[email protected]>.  
-
 =head1 LICENSE
 
-Copyright (C) 1996-2006 David Muir Sharnoff.  License hereby
+Copyright (C) 1996-2010 David Muir Sharnoff.  
+Copyright (C) 2011 Google, Inc.  
+License hereby
 granted for anyone to use, modify or redistribute this module at
-their own risk.  Please feed useful changes back to [email protected].
+their own risk.  Please feed useful changes back to [email protected].
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Time-modules-2006.0814/lib/Time/Timezone.pm 
new/Time-modules-2011.0517/lib/Time/Timezone.pm
--- old/Time-modules-2006.0814/lib/Time/Timezone.pm     2006-08-15 
23:06:16.000000000 +0200
+++ new/Time-modules-2011.0517/lib/Time/Timezone.pm     2008-04-01 
00:56:52.000000000 +0200
@@ -330,7 +330,7 @@
 =head1 AUTHORS
 
 Graham Barr <[email protected]>
-David Muir Sharnoff <[email protected]>
+David Muir Sharnoff <[email protected]>
 Paul Foley <[email protected]>
 
 =head1 LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Time-modules-2006.0814/t/datetime.t 
new/Time-modules-2011.0517/t/datetime.t
--- old/Time-modules-2006.0814/t/datetime.t     2006-08-15 23:27:07.000000000 
+0200
+++ new/Time-modules-2011.0517/t/datetime.t     2011-05-12 12:16:01.000000000 
+0200
@@ -1,6 +1,4 @@
-#!/usr/bin/perl5.00502 -I. -w
-
-# David Muir Sharnoff <[email protected]>
+#!/usr/bin/perl -I. -w
 
 # find out why it died if not running under make
 
@@ -8,7 +6,7 @@
 
 $Time::ParseDate::debug = $debug;
 
-BEGIN { 
+BEGIN {
        $okat = 12;
        $ENV{'LANG'} = 'C';
        $ENV{'TZ'} = 'PST8PDT'; 
@@ -42,6 +40,7 @@
                't' =>  "\t",
                'T' =>  "21:05:57",
                'U' =>  "46",
+               'v' =>  "19-Nov-1994",
                'w' =>  "6",
                'W' =>  "46",
                'x' =>  "11/19/94",
@@ -289,7 +288,28 @@
                1078876800, ['2004-03-10 00:00:00 GMT'],
                1081551599, ['-1 second +1 month', NOW => 1078876800, ZONE => 
'PDT'],
                1081526399, ['-1 second +1 month', NOW => 1078876800, ZONE => 
'GMT'],
-
+               1304661600, ['11pm', NOW => 1304611460],
+               1304636400, ['11pm', NOW => 1304611460, GMT => 1],
+               1304557200, ['1am', NOW => 1304611460, GMT => 1],
+               1246950000, ['2009/7/7'],
+               -1636819200, ['1918/2/18'],
+               1246950000, ['2009/7/7'],
+               1256435700, ['2009-10-25 02:55:00', ZONE => 'MET'],
+               1256439300, ['+ 1 hour', NOW => 1256435700, ZONE => 'MET'],
+               1256464500, ['2009-10-25 02:55:00', ZONE => 'PDT'],
+               1256468100, ['+ 1 hour', NOW => 1256464500, ZONE => 'PDT'],
+               1256468100, ['2009-10-25 02:55:00', ZONE => 'PST'],
+               1256471700, ['+ 1 hour', NOW => 1256468100, ZONE => 'PST'],
+               [1304622000, 'Foo'], ['12pm Foo', NOW => 1304611460, WHOLE => 
0],
+               undef, ['Foo 12pm', NOW => 1304611460, WHOLE => 0],
+               undef, ['Foo noon', NOW => 1304611460, WHOLE => 0],
+               undef, ['Foo midnight', NOW => 1304611460, WHOLE => 0],
+               1011252345, ['Wed Jan 16 23:25:45 2002'],
+               1012550400, ['Feb 1', NOW => 1011252345],
+               1012550400, ['Feb 1', NOW => 1011252345, FUZZY => 1, 
PREFER_FUTURE => 1],
+               1012550400, ['2/1/02', NOW => 1011252345, FUZZY => 1, 
PREFER_FUTURE => 1],
+               1011247200, ['6am', GMT => 1, NOW => 1011252345],
+               1256435700, ['2009-10-25 02:55:00', ZONE => 'MEZ'],
                );
 
        %tztests = (
@@ -306,10 +326,26 @@
 use Time::ParseDate;
 use Time::Local;
 use Time::Timezone;
+use POSIX qw(tzset);
+
+tzset;
+
+my @x = localtime(785307957);
+my @y = gmtime(785307957);
+my $hd = $y[2] - $x[2];
+$hd += 24 if $hd < 0;
+$hd %= 24;
+if ($hd != 8) {
+       print "1..0 # Skipped: It seems localtime() does not honor \$ENV{TZ} 
when set in the test script.  Please set the TZ environment variable to PST8PDT 
and rerun.";
+       print "hd = $hd, x = @x, y = @y\n" if $debug || -t STDOUT;
+       exit 0;
+}
 
 my $before_big = $okat-1+scalar(keys %k)+scalar(keys %tztests);
 
-printf "1..%d\n", $before_big + @sdt/2;
+printf "1..%d\n", $before_big + scalar(grep(ref($_), @sdt));
+
+print "ok 1\n";
 
 $epoch = ($Time::JulianDay::jd_epoch - 2440588) * 86400
        + $Time::JulianDay::jd_epoch_remainder;
@@ -317,18 +353,6 @@
 
 $etime = 785307957.5 - $epoch;
 
-@x = localtime(785307957);
-@y = gmtime(785307957);
-my $hd = $y[2] - $x[2];
-$hd += 24 if $hd < 0;
-$hd %= 24;
-if ($hd != 8) {
-       print STDERR "\nIt seems localtime() does not honor \$ENV{TZ} when set 
in the test script.\nPlease set the TZ environment variable to PST8PDT and 
rerun.\n";
-       print "hd = $hd, x = @x, y = @y\n" if $debug || -t STDOUT;
-       print "not ok 1\n";
-} else {
-       print "ok 1\n";
-}
 
 eval " 1/0; ";  # tests a bug in ctime!
 $x = ctime($etime);
@@ -383,7 +407,7 @@
 $lt[0] += ($etime - int($etime));
 foreach $i (sort keys %k) {
        $x = strftime("-%$i-", @lt);
-       print $x eq "-$k{$i}-" ? "ok $c\n" : "not ok $c\n";
+       print $x eq "-$k{$i}-" ? "ok $c # $i - $k{$i}\n" : "not ok $c # $i - 
$k{$i}: $x\n";
        if ($debug && $x ne "-$k{$i}-") {
                print "strftime(\"-%$i-\") = $x.\n\tshould be: $k{$i}.\n";
                exit(0);
@@ -401,8 +425,14 @@
        $c++;
 }
 
+
 while (@sdt) {
        $es = shift(@sdt);
+       my $eremaining;
+       if (ref($es)) {
+               $eremaining = $es->[1];
+               $es = $es->[0];
+       }
        $es -= $epoch if defined($es);
        $ar = shift(@sdt);
        $toparse = shift(@$ar);
@@ -411,13 +441,18 @@
                $opts{NOW} -= $epoch;
        }
        $opts{WHOLE} = 1 unless defined $opts{WHOLE};
-       $s = parsedate($toparse, %opts);
+       my $remaining;
+       if (defined $eremaining) {
+               ($s, $remaining) = parsedate($toparse, %opts);
+       } else {
+               $s = parsedate($toparse, %opts);
+       }
        if (! defined($es) && ! defined($s)) {
-               print "ok $c\n";
-       } elsif ($es == $s) {
-               print "ok $c\n";
+               print "ok $c # $toparse\n";
+       } elsif (defined($es) && defined($s) && $es == $s) {
+               print "ok $c # $toparse\n";
        } else {
-               print "not ok $c\n";
+               print "not ok $c # $toparse\n";
                if (-t STDOUT || $debug) {
                        if (defined($es)) {
                                print strftime("Expected($es):    %c %Z\n", 
localtime($es));
@@ -446,5 +481,16 @@
                        }
                }
        }
+       if (defined($eremaining)) {
+               $c++;
+               if ($remaining eq $eremaining) {
+                       print "ok $c # remaining = '$eremaining'\n";
+               } else {
+                       print "not ok $c # remaining = '$eremaining'\n";
+                       if (-t STDOUT || $debug) {
+                               print "# got '$remaining' instead\n";
+                       }
+               }
+       }
        $c++;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Time-modules-2006.0814/t/metdate.t 
new/Time-modules-2011.0517/t/metdate.t
--- old/Time-modules-2006.0814/t/metdate.t      1970-01-01 01:00:00.000000000 
+0100
+++ new/Time-modules-2011.0517/t/metdate.t      2011-05-12 12:20:03.000000000 
+0200
@@ -0,0 +1,72 @@
+#!/usr/bin/perl -I. -w
+
+use strict;
+use warnings;
+use Test::More; 
+use Time::ParseDate;
+use Time::CTime;
+use POSIX qw(tzset);
+
+my $finished;
+END { ok($finished, 'finished') if defined $finished }
+
+$ENV{'LANG'} = 'C';
+$ENV{'TZ'} = 'PST8PDT'; 
+tzset;
+
+my @x = localtime(785307957);
+my @y = gmtime(785307957);
+my $hd = $y[2] - $x[2];
+$hd += 24 if $hd < 0;
+$hd %= 24;
+if ($hd != 8) {
+       import Test::More skip_all => "It seems localtime() does not honor 
\$ENV{TZ} when set in the test script.";
+       exit 0;
+}
+import Test::More qw(no_plan);
+
+$ENV{'TZ'} = 'MET'; 
+tzset;
+
+@x = localtime(785307957);
+@y = gmtime(785307957);
+$hd = $y[2] - $x[2];
+$hd += 24 if $hd < 0;
+$hd %= 24;
+if ($hd != 23) {
+       print "1..0 # Skipped: It seems localtime() does not honor \$ENV{TZ} 
when set in the test script.\n";
+       exit 0;
+}
+
+$finished = 0;
+
+$ENV{TZ} = 'MET';
+tzset;
+
+my $t0 = parsedate("2009-10-25 02:55:00");
+my $t1 = parsedate("+ 1 hour", NOW => scalar(parsedate("2009-10-25 
02:55:00")));
+my $lt1 = scalar(localtime($t1));
+
+is($t0, 1256435700, "testing TZ=MET seconds");
+is($t1, 1256439300, "testing TZ=MET seconds +1 h");
+is($lt1, "Sun Oct 25 03:55:00 2009", "testing TZ=MET +1 h localtime");
+
+$ENV{TZ} = "PST8PDT";
+tzset;
+
+my $p0 = parsedate("2009-11-01 01:55:00");
+my $p1 = parsedate("+ 1 hour", NOW => scalar(parsedate("2009-11-01 
01:55:00")));
+my $lp0 = scalar(localtime($p0));
+my $lp1 = scalar(localtime($p1));
+my $lpz0 = strftime("%R %Z",localtime($p0));
+my $lpz1 = strftime("%R %Z",localtime($p1));
+
+is($p0, 1257065700, "testing PST8PDT");
+is($lp0, "Sun Nov  1 01:55:00 2009", "testing PST8PDT localtime");
+is($p1, 1257069300, "testing PST8PDT");
+is($lp1, "Sun Nov  1 01:55:00 2009", "testing PST8PDT localtime");
+is($lpz0, "01:55 PDT", "zone 0");
+is($lpz1, "01:55 PST", "zone 1");
+
+$finished = 1;
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Time-modules-2006.0814/t/order1.t 
new/Time-modules-2011.0517/t/order1.t
--- old/Time-modules-2006.0814/t/order1.t       1970-01-01 01:00:00.000000000 
+0100
+++ new/Time-modules-2011.0517/t/order1.t       2011-05-12 12:20:16.000000000 
+0200
@@ -0,0 +1,33 @@
+#!/usr/bin/perl -I. -w
+
+use strict;
+use warnings;
+use Test::More;
+use Time::ParseDate;
+use POSIX qw(tzset);
+
+my $finished;
+END { ok($finished, 'finished') if defined $finished }
+
+$ENV{'LANG'} = 'C';
+$ENV{'TZ'} = 'PST8PDT'; 
+tzset;
+
+my @x = localtime(785307957);
+my @y = gmtime(785307957);
+my $hd = $y[2] - $x[2];
+$hd += 24 if $hd < 0;
+$hd %= 24;
+if ($hd != 8) {
+       import Test::More skip_all => "It seems localtime() does not honor 
\$ENV{TZ} when set in the test script.  Please set the TZ environment variable 
to PST8PDT and rerun.";
+       exit 0;
+}
+import Test::More qw(no_plan);
+
+$finished = 0;
+
+is(parsedate('1918/2/18'), -1636819200, "year 1918");
+is(parsedate('2009/7/7'), 1246950000, "year 2009");
+
+$finished = 1;
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Time-modules-2006.0814/t/order2.t 
new/Time-modules-2011.0517/t/order2.t
--- old/Time-modules-2006.0814/t/order2.t       1970-01-01 01:00:00.000000000 
+0100
+++ new/Time-modules-2011.0517/t/order2.t       2011-05-17 17:40:59.000000000 
+0200
@@ -0,0 +1,33 @@
+#!/usr/bin/perl -I. -w
+
+use strict;
+use warnings;
+use Time::ParseDate;
+use Test::More;
+use POSIX qw(tzset);
+
+my $finished;
+END { ok($finished, 'finished') if defined $finished }
+
+$ENV{'LANG'} = 'C';
+$ENV{'TZ'} = 'PST8PDT'; 
+tzset;
+
+my @x = localtime(785307957);
+my @y = gmtime(785307957);
+my $hd = $y[2] - $x[2];
+$hd += 24 if $hd < 0;
+$hd %= 24;
+if ($hd != 8) {
+       import Test::More skip_all => "It seems localtime() does not honor 
\$ENV{TZ} when set in the test script.  Please set the TZ environment variable 
to PST8PDT and rerun.";
+       exit 0;
+}
+import Test::More qw(no_plan);
+
+$finished = 0;
+
+is(parsedate('2009/7/7'), 1246950000, "year 2009");
+is(parsedate('1918/2/18'), -1636819200, "year 1918");
+
+$finished = 1;
+


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to