diff -Nru libdatetime-format-dateparse-perl-0.04/Changes libdatetime-format-dateparse-perl-0.05/Changes --- libdatetime-format-dateparse-perl-0.04/Changes 2006-09-18 00:11:00.000000000 +0100 +++ libdatetime-format-dateparse-perl-0.05/Changes 2010-04-10 20:19:52.000000000 +0100 @@ -1,5 +1,10 @@ Revision history for Perl module DateTime::Format::DateParse +0.05 + - test warning fix + - Nanoseconds are always turned into an integer, with rounding as + needed. (Dave Rolsky) + 0.04 Sun Sep 17 13:10:19 HST 2006 - fix a bug in Build.pl diff -Nru libdatetime-format-dateparse-perl-0.04/debian/changelog libdatetime-format-dateparse-perl-0.05/debian/changelog --- libdatetime-format-dateparse-perl-0.04/debian/changelog 2010-05-09 19:01:27.000000000 +0100 +++ libdatetime-format-dateparse-perl-0.05/debian/changelog 2010-04-16 21:14:07.000000000 +0100 @@ -1,3 +1,16 @@ +libdatetime-format-dateparse-perl (0.05-1) unstable; urgency=low + + * New upstream release. + * Set Standards-Version to 3.8.4 (no changes). + * Remove patch nanoseconds.patch (fixed upstream) and quilt framework. + * Convert to source format 3.0 (quilt). + * debian/copyright: update formatting. + * debian/control: remove versions from libdatetime-timezone-perl, + libdatetime-perl, libtimedate-perl (build) dependency, all already fulfilled + in oldstable. + + -- gregor herrmann Fri, 16 Apr 2010 22:14:06 +0200 + libdatetime-format-dateparse-perl (0.04-2) unstable; urgency=low [ Nathan Handler ] diff -Nru libdatetime-format-dateparse-perl-0.04/debian/control libdatetime-format-dateparse-perl-0.05/debian/control --- libdatetime-format-dateparse-perl-0.04/debian/control 2010-05-09 19:01:27.000000000 +0100 +++ libdatetime-format-dateparse-perl-0.05/debian/control 2010-04-16 21:11:55.000000000 +0100 @@ -2,20 +2,20 @@ Section: perl Priority: optional Build-Depends: debhelper (>= 7.2.10), perl (>= 5.10) | libmodule-build-perl -Build-Depends-Indep: perl, libdatetime-timezone-perl (>= 0.27), - libdatetime-perl (>= 0.29), libtimedate-perl (>= 1.16), quilt (>= 0.46-7) +Build-Depends-Indep: perl, libdatetime-timezone-perl, + libdatetime-perl, libtimedate-perl Maintainer: Debian Perl Group Uploaders: Jonathan Yu , Ryan Niebur , gregor herrmann -Standards-Version: 3.8.3 +Standards-Version: 3.8.4 Homepage: http://search.cpan.org/dist/DateTime-Format-DateParse/ Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libdatetime-format-dateparse-perl/ Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libdatetime-format-dateparse-perl/ Package: libdatetime-format-dateparse-perl Architecture: all -Depends: ${perl:Depends}, ${misc:Depends}, libdatetime-timezone-perl (>= 0.27), - libdatetime-perl (>= 0.29), libtimedate-perl (>= 1.16) +Depends: ${perl:Depends}, ${misc:Depends}, libdatetime-timezone-perl, + libdatetime-perl, libtimedate-perl Description: Perl module parsing Date::Parse compatible formats DateTime::Format::DateParse is a rather simplistic convenience module that simply wraps the Date::Parse module (see libtimedate-perl) and creates diff -Nru libdatetime-format-dateparse-perl-0.04/debian/copyright libdatetime-format-dateparse-perl-0.05/debian/copyright --- libdatetime-format-dateparse-perl-0.04/debian/copyright 2010-05-09 19:01:27.000000000 +0100 +++ libdatetime-format-dateparse-perl-0.05/debian/copyright 2010-04-16 21:08:08.000000000 +0100 @@ -1,29 +1,30 @@ -Format-Specification: - http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=196 -Upstream-Maintainer: Joshua Hoblitt -Upstream-Source: http://search.cpan.org/dist/DateTime-Format-DateParse/ -Upstream-Name: DateTime-Format-DateParse +Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135 +Maintainer: Joshua Hoblitt (JHOBLITT) +Source: http://search.cpan.org/dist/DateTime-Format-DateParse/ +Name: DateTime-Format-DateParse Files: * Copyright: 2005-2006, Joshua Hoblitt -License-Alias: Perl -License: Artistic | GPL-1+ +License: Artistic or GPL-1+ Files: debian/* -Copyright: 2009, Jonathan Yu - 2009, Ryan Niebur -License: Artistic | GPL-1+ +Copyright: 2009, Ryan Niebur + 2009, Jonathan Yu + 2009, 2010, gregor herrmann +License: Artistic or GPL-1+ License: Artistic - This program is free software; you can redistribute it and/or modify - it under the terms of the Artistic License, which comes with Perl. - On Debian GNU/Linux systems, the complete text of the Artistic License - can be found in `/usr/share/common-licenses/Artistic' + This program is free software; you can redistribute it and/or modify + it under the terms of the Artistic License, which comes with Perl. + . + On Debian GNU/Linux systems, the complete text of the Artistic License + can be found in `/usr/share/common-licenses/Artistic' License: GPL-1+ - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 1, or (at your option) - any later version. - On Debian GNU/Linux systems, the complete text of the GNU General - Public License can be found in `/usr/share/common-licenses/GPL' + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + . + On Debian GNU/Linux systems, the complete text of the GNU General + Public License can be found in `/usr/share/common-licenses/GPL' diff -Nru libdatetime-format-dateparse-perl-0.04/debian/patches/nanoseconds.patch libdatetime-format-dateparse-perl-0.05/debian/patches/nanoseconds.patch --- libdatetime-format-dateparse-perl-0.04/debian/patches/nanoseconds.patch 2010-05-09 19:01:27.000000000 +0100 +++ libdatetime-format-dateparse-perl-0.05/debian/patches/nanoseconds.patch 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -Author: ANDK (Andreas Koenig) -Description: DateTime used to silently accept non-integer arguments and not do anything - intelligent with them. Since 0.52 it insists on integers. -Origin: ftp://cpan.cpantesters.org/CPAN/authors/id/A/AN/ANDK/patches/DateTime-Format-DateParse-0.04-ANDK-01.patch.gz -Bugs: http://rt.cpan.org/Public/Bug/Display.html?id=52598 -Bugs-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=560637 - ---- a/lib/DateTime/Format/DateParse.pm -+++ b/lib/DateTime/Format/DateParse.pm -@@ -30,9 +30,10 @@ - - my %p; - if ( $ss ) { -- my $fraction = $ss - int( $ss ); -- $p{ nanosecond } = $fraction * 1e9 if $fraction; -- $p{ second } = int $ss; -+ ($p{"second"},my $nanosecond) = split /\./, $ss; -+ if ( $nanosecond ){ -+ $p{ nanosecond } = $nanosecond . "0"x(9-length($nanosecond)); -+ } - } - $p{ minute } = $mm if $mm; - $p{ hour } = $hh if $hh; diff -Nru libdatetime-format-dateparse-perl-0.04/debian/patches/series libdatetime-format-dateparse-perl-0.05/debian/patches/series --- libdatetime-format-dateparse-perl-0.04/debian/patches/series 2010-05-09 19:01:27.000000000 +0100 +++ libdatetime-format-dateparse-perl-0.05/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -nanoseconds.patch diff -Nru libdatetime-format-dateparse-perl-0.04/debian/README.source libdatetime-format-dateparse-perl-0.05/debian/README.source --- libdatetime-format-dateparse-perl-0.04/debian/README.source 2010-05-09 19:01:27.000000000 +0100 +++ libdatetime-format-dateparse-perl-0.05/debian/README.source 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +0,0 @@ -This package uses quilt to manage all modifications to the upstream -source. Changes are stored in the source package as diffs in -debian/patches and applied during the build. - -See /usr/share/doc/quilt/README.source for a detailed explanation. - diff -Nru libdatetime-format-dateparse-perl-0.04/debian/rules libdatetime-format-dateparse-perl-0.05/debian/rules --- libdatetime-format-dateparse-perl-0.04/debian/rules 2010-05-09 19:01:27.000000000 +0100 +++ libdatetime-format-dateparse-perl-0.05/debian/rules 2010-04-16 21:03:32.000000000 +0100 @@ -1,4 +1,4 @@ #!/usr/bin/make -f %: - dh --with quilt $@ + dh $@ diff -Nru libdatetime-format-dateparse-perl-0.04/debian/source/format libdatetime-format-dateparse-perl-0.05/debian/source/format --- libdatetime-format-dateparse-perl-0.04/debian/source/format 1970-01-01 01:00:00.000000000 +0100 +++ libdatetime-format-dateparse-perl-0.05/debian/source/format 2010-05-09 19:01:28.000000000 +0100 @@ -0,0 +1 @@ +3.0 (quilt) diff -Nru libdatetime-format-dateparse-perl-0.04/lib/DateTime/Format/DateParse.pm libdatetime-format-dateparse-perl-0.05/lib/DateTime/Format/DateParse.pm --- libdatetime-format-dateparse-perl-0.04/lib/DateTime/Format/DateParse.pm 2006-09-18 00:11:00.000000000 +0100 +++ libdatetime-format-dateparse-perl-0.05/lib/DateTime/Format/DateParse.pm 2010-04-10 20:19:52.000000000 +0100 @@ -2,12 +2,12 @@ # Copyright (C) 2005-6 Joshua Hoblitt # -# $Id: DateParse.pm 3517 2006-09-17 23:10:10Z jhoblitt $ +# $Id: DateParse.pm 4429 2010-04-10 19:14:33Z jhoblitt $ use strict; use vars qw($VERSION); -$VERSION = '0.04'; +$VERSION = '0.05'; use DateTime; use DateTime::TimeZone; @@ -31,7 +31,13 @@ my %p; if ( $ss ) { my $fraction = $ss - int( $ss ); - $p{ nanosecond } = $fraction * 1e9 if $fraction; + if ($fraction) { + my $nano = $fraction * 1e9; + if ( $nano != int( $nano ) ) { + $nano++ if $nano - int( $nano ) >= 0.5; + } + $p{ nanosecond } = int( $nano ); + } $p{ second } = int $ss; } $p{ minute } = $mm if $mm; diff -Nru libdatetime-format-dateparse-perl-0.04/Makefile.PL libdatetime-format-dateparse-perl-0.05/Makefile.PL --- libdatetime-format-dateparse-perl-0.04/Makefile.PL 2006-09-18 00:11:00.000000000 +0100 +++ libdatetime-format-dateparse-perl-0.05/Makefile.PL 2010-04-10 20:19:52.000000000 +0100 @@ -1,31 +1,34 @@ -# Note: this file was auto-generated by Module::Build::Compat version 0.03 - +# Note: this file was auto-generated by Module::Build::Compat version 0.3601 + unless (eval "use Module::Build::Compat 0.02; 1" ) { print "This module requires Module::Build to install itself.\n"; - + require ExtUtils::MakeMaker; my $yn = ExtUtils::MakeMaker::prompt (' Install Module::Build now from CPAN?', 'y'); - + unless ($yn =~ /^y/i) { die " *** Cannot install without Module::Build. Exiting ...\n"; } - + require Cwd; require File::Spec; require CPAN; - + # Save this 'cause CPAN will chdir all over the place. my $cwd = Cwd::cwd(); - + CPAN::Shell->install('Module::Build::Compat'); CPAN::Shell->expand("Module", "Module::Build::Compat")->uptodate or die "Couldn't install Module::Build, giving up.\n"; - + chdir $cwd or die "Cannot chdir() back to $cwd: $!"; } eval "use Module::Build::Compat 0.02; 1" or die $@; Module::Build::Compat->run_build_pl(args => \@ARGV); + my $build_script = 'Build'; + $build_script .= '.com' if $^O eq 'VMS'; + exit(0) unless(-e $build_script); # cpantesters convention require Module::Build; Module::Build::Compat->write_makefile(build_class => 'Module::Build'); diff -Nru libdatetime-format-dateparse-perl-0.04/META.yml libdatetime-format-dateparse-perl-0.05/META.yml --- libdatetime-format-dateparse-perl-0.04/META.yml 2006-09-18 00:11:00.000000000 +0100 +++ libdatetime-format-dateparse-perl-0.05/META.yml 2010-04-10 20:19:52.000000000 +0100 @@ -1,22 +1,24 @@ --- -name: DateTime-Format-DateParse -version: 0.04 +abstract: 'Parses Date::Parse compatible formats' author: - 'Joshua Hoblitt (JHOBLITT) ' -abstract: Parses Date::Parse compatible formats +configure_requires: + Module::Build: 0.36 +generated_by: 'Module::Build version 0.3601' license: perl -resources: - license: http://dev.perl.org/licenses/ +meta-spec: + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4 +name: DateTime-Format-DateParse +provides: + DateTime::Format::DateParse: + file: lib/DateTime/Format/DateParse.pm + version: 0.05 requires: Date::Parse: 2.27 DateTime: 0.29 DateTime::TimeZone: 0.27 Time::Zone: 2.22 -provides: - DateTime::Format::DateParse: - file: lib/DateTime/Format/DateParse.pm - version: 0.04 -generated_by: Module::Build version 0.28 -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.2.html - version: 1.2 +resources: + license: http://dev.perl.org/licenses/ +version: 0.05 diff -Nru libdatetime-format-dateparse-perl-0.04/README libdatetime-format-dateparse-perl-0.05/README --- libdatetime-format-dateparse-perl-0.04/README 2006-09-18 00:11:00.000000000 +0100 +++ libdatetime-format-dateparse-perl-0.05/README 2010-04-10 20:19:52.000000000 +0100 @@ -17,26 +17,28 @@ Methods Class Methods - * parse_datetime($date [, $zone]) + * parse_datetime($date [, $zone]) + Accepts a Date::Parse compatible $date string and optionally a Time::Zone compatible $zone string. Returns a DateTime object. GOTCHAS - * If parse_datetime is called on a $date that doesn't know specify a - timezone and $zone is not set, then the timezone of the returned - DateTime object will be set to the "local" timezone. This is consistent - with the behavior of Date::Parse. - * If parse_datetime is called without a $zone but the $date string - *does* specify a timezone/offset or if parse_datetime is called with a - $zone that DateTime::TimeZone does not understand, the returned DateTime - object will have it's timezone set to a fixed offset from UTC. This - means that "DST" information is not available and date math will not - reflect "DST" transitions. This may be resolved for true timezones by - using the DateTime::TimeZone::Alias module to "alias" the Time::Zone - timezone to an Olson DB name. This may be done automatically in a future - release. + * If parse_datetime is called on a $date that doesn't know specify a + timezone and $zone is not set, then the timezone of the returned + DateTime object will be set to the "local" timezone. This is + consistent with the behavior of Date::Parse. + + * If parse_datetime is called without a $zone but the $date string + *does* specify a timezone/offset or if parse_datetime is called with + a $zone that DateTime::TimeZone does not understand, the returned + DateTime object will have it's timezone set to a fixed offset from + UTC. This means that "DST" information is not available and date + math will not reflect "DST" transitions. This may be resolved for + true timezones by using the DateTime::TimeZone::Alias module to + "alias" the Time::Zone timezone to an Olson DB name. This may be + done automatically in a future release. CREDITS Graham Barr (GBARR) , author of Date::Parse diff -Nru libdatetime-format-dateparse-perl-0.04/t/02_date.t libdatetime-format-dateparse-perl-0.05/t/02_date.t --- libdatetime-format-dateparse-perl-0.04/t/02_date.t 2006-09-18 00:11:00.000000000 +0100 +++ libdatetime-format-dateparse-perl-0.05/t/02_date.t 2010-04-10 20:19:52.000000000 +0100 @@ -138,9 +138,20 @@ my @data = split(/\n/, $data); -plan tests => scalar @data; +plan tests => scalar @data + 2; foreach my $format (@data) { my $dt = DateTime::Format::DateParse->parse_datetime($format); isa_ok($dt, 'DateTime'); } + +{ + my $dt = DateTime::Format::DateParse->parse_datetime('1995-01-24T09:08:17.1823213'); + is( $dt->nanosecond, 182_321_300, 'nanosecond is an integer' ); +} + +{ + my $dt = DateTime::Format::DateParse->parse_datetime('1995-01-24T09:08:17.6666666666'); + is( $dt->nanosecond, 666_666_667, 'nanosecond is rounded properly' ); +} +