In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/9bc7f50b6c983278ffa7b722240000d38037e149?hp=e9483e47cc84a47f79657e90aaa2937554f94e00>
- Log ----------------------------------------------------------------- commit 9bc7f50b6c983278ffa7b722240000d38037e149 Author: Chris 'BinGOs' Williams <[email protected]> Date: Fri Sep 6 13:24:57 2013 +0100 Update Time-Piece to CPAN version 1.23 [DELTA] 1.23 2013-09-06 - add a LICENSE file (thanks, John Peacock!) - make sure Time::Seconds loads Exporter, which it relies on (thanks, GFUJI and TOKUHIROM!) - fix day of year parsing (like "%y%j") (thanks, Doug Wilson) ----------------------------------------------------------------------- Summary of changes: Porting/Maintainers.pl | 2 +- cpan/Time-Piece/Changes | 140 +++++++++++++++++++++++--------------------- cpan/Time-Piece/Makefile.PL | 1 + cpan/Time-Piece/Piece.pm | 9 ++- cpan/Time-Piece/Piece.xs | 1 + cpan/Time-Piece/Seconds.pm | 6 +- cpan/Time-Piece/t/02core.t | 8 ++- 7 files changed, 93 insertions(+), 74 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index fe6fa4b..6f87261 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1912,7 +1912,7 @@ use File::Glob qw(:case); 'Time::Piece' => { 'MAINTAINER' => 'msergeant', - 'DISTRIBUTION' => 'RJBS/Time-Piece-1.22.tar.gz', + 'DISTRIBUTION' => 'RJBS/Time-Piece-1.23.tar.gz', 'FILES' => q[cpan/Time-Piece], 'UPSTREAM' => undef, }, diff --git a/cpan/Time-Piece/Changes b/cpan/Time-Piece/Changes index d7a3ab2..e9002a5 100644 --- a/cpan/Time-Piece/Changes +++ b/cpan/Time-Piece/Changes @@ -1,109 +1,115 @@ -Time::Piece Changes +Revision history for Time-Piece + +1.23 2013-09-06 + - add a LICENSE file (thanks, John Peacock!) + - make sure Time::Seconds loads Exporter, which it relies on (thanks, + GFUJI and TOKUHIROM!) + - fix day of year parsing (like "%y%j") (thanks, Doug Wilson) 1.22 2013-08-12 - - add explicit copyright and license statements - - fix encoding of .pm files and add =encoding directive + - add explicit copyright and license statements + - fix encoding of .pm files and add =encoding directive 1.21 2013-07-06 - - fix installation target; now installs to site in v5.12 and later - - make Time::Seconds match its VERSION to Time::Piece - - numerous portability fixes imported from perl core distribution + - fix installation target; now installs to site in v5.12 and later + - make Time::Seconds match its VERSION to Time::Piece + - numerous portability fixes imported from perl core distribution 1.20 - - Fix for alloca broke Solaris - - Fixed documentation buggette about strptime - - Added ->pretty() method for Time::Seconds objects - - Add %s support to strptime + - Fix for alloca broke Solaris + - Fixed documentation buggette about strptime + - Added ->pretty() method for Time::Seconds objects + - Add %s support to strptime 1.19 - - Fix for alloca broke FreeBSD + - Fix for alloca broke FreeBSD 1.18 - - Fix for alloca on IRIX + - Fix for alloca on IRIX 1.17 - - Force all to use internal strptime then everyone gets %z even OSX - users. - - Finally figured out the timezone test failures on Win32 and fixed - them. + - Force all to use internal strptime then everyone gets %z even OSX + users. + - Finally figured out the timezone test failures on Win32 and fixed + them. 1.16 - - Implement %z for the internal implementation of strptime(). - Unfortunately this doesn't get picked up everywhere, so there are - no tests for it (yet - patches welcome). - - Fix for major bug in add_months() using negative months which were - multiples of 12. Also affected add_years() with negative years. - - Fix for object creation bug in get_epochs which called new from - object but that wasn't supported in the new() code. - - Added docs about the weakness of using epoch seconds internally - and suggested alternatives. - - Removed useless "use UNIVERSAL qw(isa)" line. - - Fix for installing over core perl version. + - Implement %z for the internal implementation of strptime(). + Unfortunately this doesn't get picked up everywhere, so there are + no tests for it (yet - patches welcome). + - Fix for major bug in add_months() using negative months which were + multiples of 12. Also affected add_years() with negative years. + - Fix for object creation bug in get_epochs which called new from + object but that wasn't supported in the new() code. + - Added docs about the weakness of using epoch seconds internally + and suggested alternatives. + - Removed useless "use UNIVERSAL qw(isa)" line. + - Fix for installing over core perl version. 1.15 - - Skip a test on Win32 that there's just no way of passing - - Document the above failure + - Skip a test on Win32 that there's just no way of passing + - Document the above failure 1.14 - - rework add_months() to not rely on strptime being able to parse - illegal dates (Gisle Aas). - - Various win32 TZ fixes from p5p core perl version + - rework add_months() to not rely on strptime being able to parse + illegal dates (Gisle Aas). + - Various win32 TZ fixes from p5p core perl version 1.13 - - More QNX fixes ([email protected]) - - Restore freebsd copyright on strptime. - - Added add_months and add_years methods. + - More QNX fixes ([email protected]) + - Restore freebsd copyright on strptime. + - Added add_months and add_years methods. 1.12 - - QNX fixes - - Merge with perl core version + - QNX fixes + - Merge with perl core version 1.11 - - Skip %V test on Win32 + - Skip %V test on Win32 1.10 - - Number of bug fixes from RT - - (maintenance by Ricardo SIGNES) - - avoid warning in _mktime (bug #19677) + - Number of bug fixes from RT + - (maintenance by Ricardo SIGNES) + - avoid warning in _mktime (bug #19677) 1.09 - - (patches from Ricardo SIGNES) - - Tests largely moved to Test::More (from Test.pm) - - Time::Piece should now be safely subclassable + - (patches from Ricardo SIGNES) + - Tests largely moved to Test::More (from Test.pm) + - Time::Piece should now be safely subclassable 1.08 - - A number of fixes for strptime - - Fixed docs wrt Time::Object references - - Fixed docs wrt ->month returning short month name - - Added ->fullmonth and ->fullday to get full day names + - A number of fixes for strptime + - Fixed docs wrt Time::Object references + - Fixed docs wrt ->month returning short month name + - Added ->fullmonth and ->fullday to get full day names 1.07 - - Fix for ->week method + - Fix for ->week method 1.06 - - Fix for Solaris pre-2.8 - - Compilation checked on: - sparc solaris 2.7 - sparc solaris 2.8 - i686 linux - ia64 linux - pa-risc1.1 hpux 10.20 - pa-risc2.0 hpux 11.00 - alpha dec_osf 4.0 - - Fixes for Win32 (Randy Kobes) + - Fix for Solaris pre-2.8 + - Compilation checked on: + sparc solaris 2.7 + sparc solaris 2.8 + i686 linux + ia64 linux + pa-risc1.1 hpux 10.20 + pa-risc2.0 hpux 11.00 + alpha dec_osf 4.0 + - Fixes for Win32 (Randy Kobes) 1.05 - - Fix for Solaris (again) + - Fix for Solaris (again) 1.04 - - Slight fixes to strptime for Solaris and MacOSX - - Bug in strptime with daylight savings fixed. + - Slight fixes to strptime for Solaris and MacOSX + - Bug in strptime with daylight savings fixed. 1.03 - - Updated MJD stuff (Tim Jeness) - - Added compare tests - - Ported test suite to Test.pm finally + - Updated MJD stuff (Tim Jeness) + - Added compare tests + - Ported test suite to Test.pm finally 1.01 - - Added cs_sec and cs_mon to Time::Seconds so that - old Time::Object installs still work (except for add()) + - Added cs_sec and cs_mon to Time::Seconds so that + old Time::Object installs still work (except for add()) diff --git a/cpan/Time-Piece/Makefile.PL b/cpan/Time-Piece/Makefile.PL index c24549c..4d6d6c3 100644 --- a/cpan/Time-Piece/Makefile.PL +++ b/cpan/Time-Piece/Makefile.PL @@ -8,5 +8,6 @@ WriteMakefile( 'AUTHOR' => 'Matt Sergeant', 'ABSTRACT_FROM' => 'Piece.pm', 'INSTALLDIRS' => ( ($] >= 5.009005 and $] < 5.011) ? 'perl' : 'site'), + 'PREREQ_PM' => { Exporter => '5.57' }, (eval { ExtUtils::MakeMaker->VERSION(6.21) } ? (LICENSE => 'perl') : ()), ); diff --git a/cpan/Time-Piece/Piece.pm b/cpan/Time-Piece/Piece.pm index 6f52dc9..e3c202c 100644 --- a/cpan/Time-Piece/Piece.pm +++ b/cpan/Time-Piece/Piece.pm @@ -19,7 +19,7 @@ our %EXPORT_TAGS = ( ':override' => 'internal', ); -our $VERSION = '1.22'; +our $VERSION = '1.23'; bootstrap Time::Piece $VERSION; @@ -639,7 +639,7 @@ Time::Piece - Object Oriented time objects =head1 DESCRIPTION -This module replaces the standard localtime and gmtime functions with +This module replaces the standard C<localtime> and C<gmtime> functions with implementations that return objects. It does so in a backwards compatible manner, so that using localtime/gmtime in the way documented in perlfunc will still return what you expect. @@ -717,6 +717,11 @@ following methods are available on the object: # see strptime man page. Creates a new # Time::Piece object +Note that C<localtime> and C<gmtime> are not listed above. If called as +methods on a Time::Piece object, they act as constructors, returning a new +Time::Piece object for the current time. In other words: they're not useful as +methods. + =head2 Local Locales Both wdayname (day) and monname (month) allow passing in a list to use diff --git a/cpan/Time-Piece/Piece.xs b/cpan/Time-Piece/Piece.xs index 90efdd4..e5a77c7 100644 --- a/cpan/Time-Piece/Piece.xs +++ b/cpan/Time-Piece/Piece.xs @@ -584,6 +584,7 @@ label: return 0; tm->tm_yday = i - 1; + tm->tm_mday = 0; break; case 'M': diff --git a/cpan/Time-Piece/Seconds.pm b/cpan/Time-Piece/Seconds.pm index 404e613..0af38fc 100644 --- a/cpan/Time-Piece/Seconds.pm +++ b/cpan/Time-Piece/Seconds.pm @@ -1,10 +1,10 @@ package Time::Seconds; use strict; -use vars qw/@EXPORT @EXPORT_OK @ISA/; +use vars qw/@EXPORT @EXPORT_OK/; -our $VERSION = '1.22'; +our $VERSION = '1.23'; -@ISA = 'Exporter'; +use Exporter 5.57 'import'; @EXPORT = qw( ONE_MINUTE diff --git a/cpan/Time-Piece/t/02core.t b/cpan/Time-Piece/t/02core.t index 1e8d264..3840e87 100644 --- a/cpan/Time-Piece/t/02core.t +++ b/cpan/Time-Piece/t/02core.t @@ -1,4 +1,4 @@ -use Test::More tests => 95; +use Test::More tests => 96; my $is_win32 = ($^O =~ /Win32/); my $is_qnx = ($^O eq 'qnx'); @@ -215,6 +215,12 @@ cmp_ok(Time::Piece->strptime("2002/12/31", '%Y/%m/%d')->yday, '==', 364); cmp_ok(Time::Piece->strptime("2002/07/10", '%Y/%m/%d')->isdst, '==', 0); cmp_ok(Time::Piece->strptime("2002/07/10", '%Y/%m/%d')->day_of_week, '==', 3); +is( + Time::Piece->strptime('12212', "%y%j")->ymd(), + '2012-07-30', + "day of the year parsing", +); + cmp_ok( Time::Piece->strptime("2000/02/29 12:34:56", '%Y/%m/%d %H:%M:%S')->epoch, '==', -- Perl5 Master Repository
