r22001 - in /branches/upstream/libtime-piece-mysql-perl/current: Changes META.yml Makefile.PL lib/Time/Piece/MySQL.pm t/timestamp.t
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Fri Jun 20 19:06:03 UTC 2008
Author: gregoa
Date: Fri Jun 20 19:06:03 2008
New Revision: 22001
URL: http://svn.debian.org/wsvn/?sc=1&rev=22001
Log:
[svn-upgrade] Integrating new upstream version, libtime-piece-mysql-perl (0.06)
Modified:
branches/upstream/libtime-piece-mysql-perl/current/Changes
branches/upstream/libtime-piece-mysql-perl/current/META.yml
branches/upstream/libtime-piece-mysql-perl/current/Makefile.PL
branches/upstream/libtime-piece-mysql-perl/current/lib/Time/Piece/MySQL.pm
branches/upstream/libtime-piece-mysql-perl/current/t/timestamp.t
Modified: branches/upstream/libtime-piece-mysql-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libtime-piece-mysql-perl/current/Changes?rev=22001&op=diff
==============================================================================
--- branches/upstream/libtime-piece-mysql-perl/current/Changes (original)
+++ branches/upstream/libtime-piece-mysql-perl/current/Changes Fri Jun 20 19:06:03 2008
@@ -1,3 +1,9 @@
+0.06 2008-06-07
+
+- added spaces to the strftime formats, as required by POSIX. Thanks to Brandt
+ Kurowski for highlighting the problem. Fixes bug #32580.
+- support newer MySQL formats. Fixes bug #23840.
+
0.05 Jul 21, 2004
- It seems that 0.04 was incorrectly bundled onto CPAN after my Solaris testing.
Modified: branches/upstream/libtime-piece-mysql-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libtime-piece-mysql-perl/current/META.yml?rev=22001&op=diff
==============================================================================
--- branches/upstream/libtime-piece-mysql-perl/current/META.yml (original)
+++ branches/upstream/libtime-piece-mysql-perl/current/META.yml Fri Jun 20 19:06:03 2008
@@ -1,12 +1,15 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: Time-Piece-MySQL
-version: 0.05
-version_from: lib/Time/Piece/MySQL.pm
-installdirs: site
-requires:
+--- #YAML:1.0
+name: Time-Piece-MySQL
+version: 0.06
+abstract: Adds MySQL-specific methods to Time::Piece
+license: ~
+author:
+ - Marty Pauley <marty+perl at kasei.com>
+generated_by: ExtUtils::MakeMaker version 6.42
+distribution_type: module
+requires:
Test::More: 0.47
Time::Piece: 1.03
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.3.html
+ version: 1.3
Modified: branches/upstream/libtime-piece-mysql-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/branches/upstream/libtime-piece-mysql-perl/current/Makefile.PL?rev=22001&op=diff
==============================================================================
--- branches/upstream/libtime-piece-mysql-perl/current/Makefile.PL (original)
+++ branches/upstream/libtime-piece-mysql-perl/current/Makefile.PL Fri Jun 20 19:06:03 2008
@@ -4,11 +4,6 @@
NAME => 'Time::Piece::MySQL',
VERSION_FROM => 'lib/Time/Piece/MySQL.pm',
PREREQ_PM => { 'Time::Piece' => 1.03, 'Test::More' => 0.47 },
- ( $] >= 5.005
- ? ( # Add these new keywords supported since 5.005
- ABSTRACT_FROM => 'lib/Time/Piece/MySQL.pm',
- AUTHOR =>
- 'Dave Rolsky <autarch at urth.org>, Marty Pauley <marty+perl at kasei.com>',
- )
- : () ),
+ ABSTRACT_FROM => 'lib/Time/Piece/MySQL.pm',
+ AUTHOR => 'Marty Pauley <marty+perl at kasei.com>',
);
Modified: branches/upstream/libtime-piece-mysql-perl/current/lib/Time/Piece/MySQL.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libtime-piece-mysql-perl/current/lib/Time/Piece/MySQL.pm?rev=22001&op=diff
==============================================================================
--- branches/upstream/libtime-piece-mysql-perl/current/lib/Time/Piece/MySQL.pm (original)
+++ branches/upstream/libtime-piece-mysql-perl/current/lib/Time/Piece/MySQL.pm Fri Jun 20 19:06:03 2008
@@ -1,7 +1,7 @@
package Time::Piece::MySQL;
use strict;
use vars qw($VERSION);
-$VERSION = '0.05';
+$VERSION = '0.06';
use Time::Piece;
@@ -13,8 +13,9 @@
BEGIN
{
+ # I don't know what this dst bug is, but the code was here...
my $has_dst_bug =
- Time::Piece->strptime( '20000601120000', '%Y%m%d%H%M%S' )->hour != 12;
+ Time::Piece->strptime( '20000601120000', '%Y %m %d %H %M %S' )->hour != 12;
sub HAS_DST_BUG () { $has_dst_bug }
}
@@ -69,6 +70,7 @@
# From MySQL version 4.1, timestamps are returned as datetime strings
my ($class, $timestamp) = @_;
my $length = length $timestamp;
+ return from_mysql_datetime(@_) if $length == 19;
# most timestamps have 2-digit years, except 8 and 14 char ones
if ( $length != 14 && $length != 8 ) {
$timestamp = (substr($timestamp, 0, 2) < 70 ? "20" : "19")
@@ -77,7 +79,7 @@
# now we need to extend this to 14 chars to make sure we get
# consistent cross-platform results
$timestamp .= substr("19700101000000", length $timestamp);
- my $time = eval {$class->strptime( $timestamp, '%Y%m%d%H%M%S')};
+ my $time = eval {$class->strptime( $timestamp, '%Y %m %d %H %M %S')};
return $time;
}
Modified: branches/upstream/libtime-piece-mysql-perl/current/t/timestamp.t
URL: http://svn.debian.org/wsvn/branches/upstream/libtime-piece-mysql-perl/current/t/timestamp.t?rev=22001&op=diff
==============================================================================
--- branches/upstream/libtime-piece-mysql-perl/current/t/timestamp.t (original)
+++ branches/upstream/libtime-piece-mysql-perl/current/t/timestamp.t Fri Jun 20 19:06:03 2008
@@ -11,6 +11,7 @@
'1202110545' => '20120211054500',
'120211054537' => '20120211054537',
'20120211054537' => '20120211054537',
+ '2005-08-10 23:20:48' => '20050810232048',
);
#my @null = qw/ 19691231235959 20380101000000 /;
More information about the Pkg-perl-cvs-commits
mailing list