r5328 - in
/packages/libdatetime-format-db2-perl/branches/upstream/current:
Changes META.yml lib/DateTime/Format/DB2.pm t/02parse.t
eloy at users.alioth.debian.org
eloy at users.alioth.debian.org
Mon Apr 30 13:42:42 UTC 2007
Author: eloy
Date: Mon Apr 30 13:42:42 2007
New Revision: 5328
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=5328
Log:
[svn-upgrade] Integrating new upstream version, libdatetime-format-db2-perl (0.05)
Modified:
packages/libdatetime-format-db2-perl/branches/upstream/current/Changes
packages/libdatetime-format-db2-perl/branches/upstream/current/META.yml
packages/libdatetime-format-db2-perl/branches/upstream/current/lib/DateTime/Format/DB2.pm
packages/libdatetime-format-db2-perl/branches/upstream/current/t/02parse.t
Modified: packages/libdatetime-format-db2-perl/branches/upstream/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdatetime-format-db2-perl/branches/upstream/current/Changes?rev=5328&op=diff
==============================================================================
--- packages/libdatetime-format-db2-perl/branches/upstream/current/Changes (original)
+++ packages/libdatetime-format-db2-perl/branches/upstream/current/Changes Mon Apr 30 13:42:42 2007
@@ -1,4 +1,5 @@
-
+2007-01-20:
+0.05 - Added parse_datetime the same as parse_timestamp, since some seem to expect it (DBIx::Class!)
2005-12-18:
0.04 - Added parsing of YYYY-MM-DD HH:MM:SS.NNNNNN since thats what DBI
actually gives us. (odd that)
Modified: packages/libdatetime-format-db2-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdatetime-format-db2-perl/branches/upstream/current/META.yml?rev=5328&op=diff
==============================================================================
--- packages/libdatetime-format-db2-perl/branches/upstream/current/META.yml (original)
+++ packages/libdatetime-format-db2-perl/branches/upstream/current/META.yml Mon Apr 30 13:42:42 2007
@@ -1,7 +1,7 @@
# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
name: DateTime-Format-DB2
-version: 0.04
+version: 0.05
version_from: lib/DateTime/Format/DB2.pm
installdirs: site
requires:
Modified: packages/libdatetime-format-db2-perl/branches/upstream/current/lib/DateTime/Format/DB2.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdatetime-format-db2-perl/branches/upstream/current/lib/DateTime/Format/DB2.pm?rev=5328&op=diff
==============================================================================
--- packages/libdatetime-format-db2-perl/branches/upstream/current/lib/DateTime/Format/DB2.pm (original)
+++ packages/libdatetime-format-db2-perl/branches/upstream/current/lib/DateTime/Format/DB2.pm Mon Apr 30 13:42:42 2007
@@ -4,7 +4,7 @@
use vars qw ($VERSION);
-$VERSION = '0.04';
+$VERSION = '0.05';
use DateTime;
use DateTime::Format::Builder
@@ -22,6 +22,18 @@
},
# 2005-12-13-12.19.07.276270
parse_timestamp =>
+ [ { params => [ qw( year month day hour minute second nanosecond) ],
+ regex => qr/^(\d\d\d\d)-(\d\d)-(\d\d)-(\d\d)\.(\d\d)\.(\d\d)(\.\d+)?$/,
+ extra => { time_zone => 'floating' },
+ postprocess => \&_fix_nano
+ },
+ { params => [ qw( year month day hour minute second nanosecond) ],
+ regex => qr/^(\d\d\d\d)-(\d\d)-(\d\d)\s(\d\d):(\d\d):(\d\d)(\.\d+)?$/,
+ extra => { time_zone => 'floating' },
+ postprocess => \&_fix_nano
+ },
+ ],
+ parse_datetime =>
[ { params => [ qw( year month day hour minute second nanosecond) ],
regex => qr/^(\d\d\d\d)-(\d\d)-(\d\d)-(\d\d)\.(\d\d)\.(\d\d)(\.\d+)?$/,
extra => { time_zone => 'floating' },
@@ -66,6 +78,7 @@
return $self->format_date($dt) . '-' . $dt->hms('.');
}
+*format_datetime = *format_timestamp;
1;
Modified: packages/libdatetime-format-db2-perl/branches/upstream/current/t/02parse.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libdatetime-format-db2-perl/branches/upstream/current/t/02parse.t?rev=5328&op=diff
==============================================================================
--- packages/libdatetime-format-db2-perl/branches/upstream/current/t/02parse.t (original)
+++ packages/libdatetime-format-db2-perl/branches/upstream/current/t/02parse.t Mon Apr 30 13:42:42 2007
@@ -1,6 +1,6 @@
use strict;
-use Test::More tests => 15;
+use Test::More tests => 21;
use DateTime::Format::DB2;
@@ -40,4 +40,14 @@
is( $dt->second, 8 );
}
+{
+ my $dt = $db2->parse_datetime( '2003-02-15 10:09:08.200000' );
+ is( $dt->year, 2003 );
+ is( $dt->month, 2 );
+ is( $dt->day, 15 );
+ is( $dt->hour, 10 );
+ is( $dt->minute, 9 );
+ is( $dt->second, 8 );
+}
+
More information about the Pkg-perl-cvs-commits
mailing list