Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package perl-DateTime-Format-Pg for
openSUSE:Factory checked in at 2021-03-18 22:54:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-DateTime-Format-Pg (Old)
and /work/SRC/openSUSE:Factory/.perl-DateTime-Format-Pg.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-DateTime-Format-Pg"
Thu Mar 18 22:54:39 2021 rev:5 rq:879441 version:0.16014
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-DateTime-Format-Pg/perl-DateTime-Format-Pg.changes
2017-05-31 12:17:42.937565031 +0200
+++
/work/SRC/openSUSE:Factory/.perl-DateTime-Format-Pg.new.2401/perl-DateTime-Format-Pg.changes
2021-03-18 22:54:44.475517917 +0100
@@ -1,0 +2,10 @@
+Tue Mar 16 03:07:50 UTC 2021 - Tina M??ller <[email protected]>
+
+- updated to 0.16014
+ see /usr/share/doc/packages/perl-DateTime-Format-Pg/Changes
+
+ 0.16014 2021-03-15T13:37:16Z
+ - Fix handling for fractional seconds (#17)
+ - Accept concatenated dates (#18)
+
+-------------------------------------------------------------------
Old:
----
DateTime-Format-Pg-0.16013.tar.gz
New:
----
DateTime-Format-Pg-0.16014.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-DateTime-Format-Pg.spec ++++++
--- /var/tmp/diff_new_pack.pfwRqJ/_old 2021-03-18 22:54:44.943518422 +0100
+++ /var/tmp/diff_new_pack.pfwRqJ/_new 2021-03-18 22:54:44.947518427 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-DateTime-Format-Pg
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,22 +12,20 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
+%define cpan_name DateTime-Format-Pg
Name: perl-DateTime-Format-Pg
-Version: 0.16013
+Version: 0.16014
Release: 0
-%define cpan_name DateTime-Format-Pg
Summary: Parse and format PostgreSQL dates and times
-License: Artistic-1.0 or GPL-1.0+
-Group: Development/Libraries/Perl
-Url: http://search.cpan.org/dist/DateTime-Format-Pg/
+License: Artistic-1.0 OR GPL-1.0-or-later
+URL: https://metacpan.org/release/%{cpan_name}
Source0:
https://cpan.metacpan.org/authors/id/D/DM/DMAKI/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(DateTime) >= 0.10
@@ -48,10 +46,10 @@
representing it in a format accepted by PostgreSQL.
%prep
-%setup -q -n %{cpan_name}-%{version}
+%autosetup -n %{cpan_name}-%{version}
%build
-%{__perl} Build.PL --installdirs=vendor
+perl Build.PL --installdirs=vendor
./Build build --flags=%{?_smp_mflags}
%check
@@ -62,8 +60,7 @@
%perl_gen_filelist
%files -f %{name}.files
-%defattr(-,root,root,755)
-%doc Changes Makefile README.md
+%doc Changes Makefile minil.toml README.md
%license LICENSE
%changelog
++++++ DateTime-Format-Pg-0.16013.tar.gz -> DateTime-Format-Pg-0.16014.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DateTime-Format-Pg-0.16013/Changes
new/DateTime-Format-Pg-0.16014/Changes
--- old/DateTime-Format-Pg-0.16013/Changes 2017-05-04 14:46:26.000000000
+0200
+++ new/DateTime-Format-Pg-0.16014/Changes 2021-03-15 14:37:24.000000000
+0100
@@ -1,5 +1,9 @@
Revision history for Perl extension DateTime::Format::Pg.
+0.16014 2021-03-15T13:37:16Z
+ - Fix handling for fractional seconds (#17)
+ - Accept concatenated dates (#18)
+
0.16013 2017-05-04T12:46:23Z
- Fix handling for nanoseconds (issue #14)
- Fix handling fractional seconds (issue #12)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DateTime-Format-Pg-0.16013/MANIFEST
new/DateTime-Format-Pg-0.16014/MANIFEST
--- old/DateTime-Format-Pg-0.16013/MANIFEST 2017-05-04 14:46:26.000000000
+0200
+++ new/DateTime-Format-Pg-0.16014/MANIFEST 2021-03-15 14:37:24.000000000
+0100
@@ -6,6 +6,7 @@
README.md
cpanfile
lib/DateTime/Format/Pg.pm
+minil.toml
t/1basic.t
t/2new-param.t
t/99-pod-coverage.t
@@ -15,6 +16,7 @@
t/format_fractional.t
t/format_interval.t
t/gh12.t
+t/gh18.t
t/parse_date.t
t/parse_datetime.t
t/parse_datetime2.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DateTime-Format-Pg-0.16013/META.json
new/DateTime-Format-Pg-0.16014/META.json
--- old/DateTime-Format-Pg-0.16013/META.json 2017-05-04 14:46:26.000000000
+0200
+++ new/DateTime-Format-Pg-0.16014/META.json 2021-03-15 14:37:24.000000000
+0100
@@ -4,7 +4,7 @@
"Daisuke Maki <[email protected]>"
],
"dynamic_config" : 0,
- "generated_by" : "Minilla/v3.0.2",
+ "generated_by" : "Minilla/v3.1.11",
"license" : [
"perl_5"
],
@@ -41,7 +41,7 @@
"requires" : {
"Test::CPAN::Meta" : "0",
"Test::MinimumVersion::Fast" : "0.04",
- "Test::PAUSE::Permissions" : "0.04",
+ "Test::PAUSE::Permissions" : "0.07",
"Test::Pod" : "1.41",
"Test::Spellunker" : "v0.2.7"
}
@@ -57,27 +57,32 @@
"provides" : {
"DateTime::Format::Pg" : {
"file" : "lib/DateTime/Format/Pg.pm",
- "version" : "0.16013"
+ "version" : "0.16014"
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
- "web" : "https://github.com/lestrrat/DateTime-Format-Pg/issues"
+ "web" : "https://github.com/lestrrat-p5/DateTime-Format-Pg/issues"
},
- "homepage" : "https://github.com/lestrrat/DateTime-Format-Pg",
+ "homepage" : "https://github.com/lestrrat-p5/DateTime-Format-Pg",
"repository" : {
- "url" : "git://github.com/lestrrat/DateTime-Format-Pg.git",
- "web" : "https://github.com/lestrrat/DateTime-Format-Pg"
+ "url" : "git://github.com/lestrrat-p5/DateTime-Format-Pg.git",
+ "web" : "https://github.com/lestrrat-p5/DateTime-Format-Pg"
}
},
- "version" : "0.16013",
+ "version" : "0.16014",
"x_contributors" : [
- "Vasily Chekalkin <[email protected]>",
+ "Daisuke Maki <[email protected]>",
"David Steinbrunner <[email protected]>",
"Henrik Pauli <[email protected]>",
- "Nitish Bezzala <[email protected]>",
"Ilya Chesnokov <[email protected]>",
- "lestrrat <[email protected]>"
- ]
+ "Nitish Bezzala <[email protected]>",
+ "Steve Rogerson <[email protected]>",
+ "Steve Rogerson <[email protected]>",
+ "Vasily Chekalkin <[email protected]>",
+ "lestrrat <[email protected]>"
+ ],
+ "x_serialization_backend" : "JSON::PP version 4.04",
+ "x_static_install" : 1
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DateTime-Format-Pg-0.16013/META.yml
new/DateTime-Format-Pg-0.16014/META.yml
--- old/DateTime-Format-Pg-0.16013/META.yml 2017-05-04 14:46:26.000000000
+0200
+++ new/DateTime-Format-Pg-0.16014/META.yml 2021-03-15 14:37:24.000000000
+0100
@@ -8,7 +8,7 @@
configure_requires:
Module::Build::Tiny: '0.035'
dynamic_config: 0
-generated_by: 'Minilla/v3.0.2, CPAN::Meta::Converter version 2.150001'
+generated_by: 'Minilla/v3.1.11, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -27,20 +27,25 @@
provides:
DateTime::Format::Pg:
file: lib/DateTime/Format/Pg.pm
- version: '0.16013'
+ version: '0.16014'
requires:
DateTime: '0.10'
DateTime::Format::Builder: '0.72'
DateTime::TimeZone: '0.05'
resources:
- bugtracker: https://github.com/lestrrat/DateTime-Format-Pg/issues
- homepage: https://github.com/lestrrat/DateTime-Format-Pg
- repository: git://github.com/lestrrat/DateTime-Format-Pg.git
-version: '0.16013'
+ bugtracker: https://github.com/lestrrat-p5/DateTime-Format-Pg/issues
+ homepage: https://github.com/lestrrat-p5/DateTime-Format-Pg
+ repository: git://github.com/lestrrat-p5/DateTime-Format-Pg.git
+version: '0.16014'
x_contributors:
- - 'Vasily Chekalkin <[email protected]>'
+ - 'Daisuke Maki <[email protected]>'
- 'David Steinbrunner <[email protected]>'
- 'Henrik Pauli <[email protected]>'
- - 'Nitish Bezzala <[email protected]>'
- 'Ilya Chesnokov <[email protected]>'
- - 'lestrrat <[email protected]>'
+ - 'Nitish Bezzala <[email protected]>'
+ - 'Steve Rogerson <[email protected]>'
+ - 'Steve Rogerson <[email protected]>'
+ - 'Vasily Chekalkin <[email protected]>'
+ - 'lestrrat <[email protected]>'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
+x_static_install: 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DateTime-Format-Pg-0.16013/lib/DateTime/Format/Pg.pm
new/DateTime-Format-Pg-0.16014/lib/DateTime/Format/Pg.pm
--- old/DateTime-Format-Pg-0.16013/lib/DateTime/Format/Pg.pm 2017-05-04
14:46:26.000000000 +0200
+++ new/DateTime-Format-Pg-0.16014/lib/DateTime/Format/Pg.pm 2021-03-15
14:37:24.000000000 +0100
@@ -11,7 +11,7 @@
use DateTime::TimeZone::UTC;
use DateTime::TimeZone::Floating;
-$VERSION = '0.16013';
+$VERSION = '0.16014';
$VERSION = eval $VERSION;
our @ISA = ('DateTime::Format::Builder');
@@ -222,12 +222,37 @@
#
# 2003-04-18 17:20:24.373942+02 (USE_ISO_DATES)
# (NB: always uses numerical tz)
-#
my $pg_datetime_iso =
{
- regex => qr/^(\d{4,})-(\d{2,})-(\d{2,})[
T](\d{2,}):(\d{2,}):(\d{2,})(\.\d+)? *([-\+][\d:]+)?( BC)?$/,
- params => [ qw( year month day hour minute second
nanosecond time_zone era) ],
- postprocess => [ \&_fix_era, \&_fix_timezone, \&_fix_nanosecond ],
+ regex =>
+ qr/^
+ (\d{4,})-(\d{2,})-(\d{2,}) # date part
+ [ T] # separator
+ (\d{2,}):(\d{2,}):(\d{2,})(\.\d+)? # time part
+ [ ]*
+ ([-\+][\d:]+)? # numerical timezone
+ ([ ]BC)?
+ $/x,
+ params => [ qw( year month day hour minute second nanosecond time_zone era)
],
+ postprocess => [ \&_fix_era, \&_fix_timezone, \&_fix_nanosecond ],
+};
+
+# * Added for https://github.com/lestrrat-p5/DateTime-Format-Pg/issues/18
+# Concatenated dates/times are accepted
+# e.g. YYYYMMDDTHHMMSS
+my $pg_datetime_iso_concat_date =
+{
+ regex =>
+ qr/^
+ (\d{4})(\d{2})(\d{2}) # concatenated date
+ [ T] # separator
+ (\d{2,}):(\d{2,}):(\d{2,})(\.\d+)? # time part
+ [ ]*
+ ([-\+][\d:]+)? # numerical timezone
+ ([ ]BC)?
+ $/x,
+ params => [ qw( year month day hour minute second nanosecond time_zone era)
],
+ postprocess => [ \&_fix_era, \&_fix_timezone, \&_fix_nanosecond ],
};
# Fri 18 Apr 17:20:24.373942 2003 CEST (USE_POSTGRES_DATES, EuroDates)
@@ -356,7 +381,7 @@
{
# XXX This barfs because 'self' may not necessarily be initialized
# Need to fix it
- my $stz = $args{'self'}->_server_tz($args{'args'} ? @{$args{'args'}} : ());
+ my $stz = $args{'self'}->server_tz($args{'args'} ? @{$args{'args'}} : ());
$args{'parsed'}->{'time_zone'} = $stz || 'floating';
}
@@ -377,21 +402,39 @@
# Parser generation
#
-DateTime::Format::Builder->create_class
-(
- parsers =>
- {
- parse_date => [ $pg_dateonly_iso, $pg_dateonly_sql,
- $pg_dateonly_german, $pg_infinity ],
- parse_timetz => [ $pg_timeonly, ],
- parse_timestamptz => [ $pg_datetime_iso, $pg_datetime_pg_eu,
- $pg_datetime_pg_us, $pg_datetime_sql,
- $pg_datetime_german, $pg_infinity ],
- parse_datetime => [ $pg_datetime_iso, $pg_datetime_pg_eu,
- $pg_datetime_pg_us, $pg_datetime_sql,
- $pg_datetime_german,
- $pg_dateonly_iso, $pg_dateonly_german,
- $pg_dateonly_sql, $pg_timeonly, $pg_infinity],
+DateTime::Format::Builder->create_class(
+ parsers => {
+ parse_date => [
+ $pg_dateonly_iso,
+ $pg_dateonly_sql,
+ $pg_dateonly_german,
+ $pg_infinity,
+ ],
+ parse_timetz => [
+ $pg_timeonly,
+ ],
+ parse_timestamptz => [
+ $pg_datetime_iso,
+ $pg_datetime_iso_concat_date,
+ $pg_datetime_pg_eu,
+ $pg_datetime_pg_us,
+ $pg_datetime_sql,
+ $pg_datetime_german,
+ $pg_infinity,
+ ],
+ parse_datetime => [
+ $pg_datetime_iso,
+ $pg_datetime_iso_concat_date,
+ $pg_datetime_pg_eu,
+ $pg_datetime_pg_us,
+ $pg_datetime_sql,
+ $pg_datetime_german,
+ $pg_dateonly_iso,
+ $pg_dateonly_german,
+ $pg_dateonly_sql,
+ $pg_timeonly,
+ $pg_infinity,
+ ],
}
);
@@ -592,7 +635,7 @@
$string =~ s/\b(\d+):(\d\d):(\d\d)(\.\d+)?\b/$1h $2m $3$4s/g;
$string =~ s/\b(\d+):(\d\d)\b/$1h $2m/g;
- $string =~ s/(-\d+h)\s+(\d+m)\s+(\d+s)\s*/$1 -$2 -$3 /;
+ $string =~ s/(-\d+h)\s+(\d+m)\s+(\d+(?:\.\d+)?s)\s*/$1 -$2 -$3 /;
$string =~ s/(-\d+h)\s+(\d+m)\s*/$1 -$2 /;
while ($string =~
s/^\s*(-?\d+(?:[.,]\d+)?)\s*([a-zA-Z]+)(?:\s*(?:,|and)\s*)*//i) {
@@ -626,10 +669,11 @@
}
# From the spec, Pg can take up to 6 digits for fractional part
- # (duh, as 1 sec = 1_000_000 nano sec). If we're missing 0's,
+ # that is microseconds. If we're missing 0's,
# we should pad them
- $fractional .= '0'x (6 - length($fractional));
- push @extra_args, ("nanoseconds" => $fractional);
+ $fractional .= '0'x (9 - length($fractional));
+ my $sign = ($amount > 0) ? 1 : -1;
+ push @extra_args, ("nanoseconds" => $sign * $fractional);
}
$du->$arith_method($base_unit => $amount * $num, @extra_args);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DateTime-Format-Pg-0.16013/minil.toml
new/DateTime-Format-Pg-0.16014/minil.toml
--- old/DateTime-Format-Pg-0.16013/minil.toml 1970-01-01 01:00:00.000000000
+0100
+++ new/DateTime-Format-Pg-0.16014/minil.toml 2021-03-15 14:37:24.000000000
+0100
@@ -0,0 +1,5 @@
+name = "DateTime-Format-Pg"
+# badges = ["travis-ci.com"]
+module_maker="ModuleBuildTiny"
+static_install = "auto"
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DateTime-Format-Pg-0.16013/t/gh12.t
new/DateTime-Format-Pg-0.16014/t/gh12.t
--- old/DateTime-Format-Pg-0.16013/t/gh12.t 2017-05-04 14:46:26.000000000
+0200
+++ new/DateTime-Format-Pg-0.16014/t/gh12.t 2021-03-15 14:37:24.000000000
+0100
@@ -15,6 +15,6 @@
}
is $duration->seconds, 28, "seconds should be '28'";
-is $duration->nanoseconds, 369220, "seconds should be '369220'";
+is $duration->nanoseconds, 369220000, "nano-seconds should be '369220000'";
-done_testing;
\ No newline at end of file
+done_testing;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DateTime-Format-Pg-0.16013/t/gh18.t
new/DateTime-Format-Pg-0.16014/t/gh18.t
--- old/DateTime-Format-Pg-0.16013/t/gh18.t 1970-01-01 01:00:00.000000000
+0100
+++ new/DateTime-Format-Pg-0.16014/t/gh18.t 2021-03-15 14:37:24.000000000
+0100
@@ -0,0 +1,24 @@
+
+use strict;
+use Test::More;
+
+use_ok('DateTime::Format::Pg');
+
+my $inputs = [
+ '20200115T00:00:13',
+ '2020-01-15T00:00:13',
+];
+
+for my $input (@$inputs) {
+ my $dt = DateTime::Format::Pg->parse_datetime($input);
+
+ is $dt->year, 2020;
+ is $dt->month, 1;
+ is $dt->day, 15;
+ is $dt->hour, 0;
+ is $dt->minute, 0;
+ is $dt->second, 13;
+}
+
+done_testing;
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/DateTime-Format-Pg-0.16013/t/parse_interval.t
new/DateTime-Format-Pg-0.16014/t/parse_interval.t
--- old/DateTime-Format-Pg-0.16013/t/parse_interval.t 2017-05-04
14:46:26.000000000 +0200
+++ new/DateTime-Format-Pg-0.16014/t/parse_interval.t 2021-03-15
14:37:24.000000000 +0100
@@ -33,6 +33,13 @@
[ '-1 days' => DateTime::Duration->new(days => -1) ],
[ '-23:59' => DateTime::Duration->new(hours => -23, minutes => -59)
],
[ '-1 days -00:01' => DateTime::Duration->new( days => -1, minutes =>
-1) ],
+ [ '-1 days -20:30:56.123456' => DateTime::Duration->new(
+ days => -1,
+ minutes => -1230, # = 20 * 60 + 30
+ seconds => -56,
+ nanoseconds => -123456000,
+ ),
+ ],
[ '1 mon -1 days' => DateTime::Duration->new(months => 1)->add(days =>
-1) ],
[ '1 day 1 month' => DateTime::Duration->new(months => 1)->add(days =>
1) ],
[ '1 month -1 days' => DateTime::Duration->new(months => 1)->add(days
=> -1) ],