Skip Menu |

This queue is for tickets about the DateTime-Format-DateManip CPAN distribution.

Report information
The Basics
Id: 102670
Status: open
Priority: 0/
Queue: DateTime-Format-DateManip

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.04
Fixed in: (no value)

Attachments
DateTime-Format-DateManip-0.04-Set-system-time-zone-in-test.patch



Subject: Test fails with since Date-Manip-6.49
The 01conversions.t fails since Date-Manip-6.49: $ prove -b -v t/01conversions.t t/01conversions.t .. WARNING: the TZ Date::Manip config variable is deprecated and will be removed in March 2016. Please use the SetDate or ForceDate config variables instead. Use of uninitialized value $mod in concatenation (.) or string at /usr/share/perl5/vendor_perl/Date/Manip/TZ.pm line 179. Use of uninitialized value $mod in concatenation (.) or string at /usr/share/perl5/vendor_perl/Date/Manip/TZ.pm line 180. Use of uninitialized value $mod in concatenation (.) or string at /usr/share/perl5/vendor_perl/Date/Manip/TZ.pm line 181. ERROR: [config_var] invalid zone in SetDate: 1..6 not ok 1 - Parse Date 'March 23, 2003' # Failed test 'Parse Date 'March 23, 2003'' # at t/01conversions.t line 67. # got: '2003-03-23T00:00:00.000000000 CET # ' # expected: '2003-03-23T00:00:00.000000000 EST # ' ok 2 - Parse Date 'March 23, 2003 12:00 US/Eastern' not ok 3 - Format Date '2003-03-23T00:00:00' # Failed test 'Format Date '2003-03-23T00:00:00'' # at t/01conversions.t line 73. # got: '2003032309:00:00' # expected: '2003032303:00:00' not ok 4 - Format Date '2003-03-23T12:00:00' # Failed test 'Format Date '2003-03-23T12:00:00'' # at t/01conversions.t line 73. # got: '2003032321:00:00' # expected: '2003032315:00:00' ok 5 - Parse Duration 'months=38:days=0:minutes=-237:seconds=-2' ok 6 - Format Duration 'months=38:days=0:minutes=-237:seconds=-2' # Looks like you failed 3 tests of 6. Dubious, test returned 3 (wstat 768, 0x300) Failed 3/6 subtests
On 2015-03-10 08:29:08, ppisar wrote: Show quoted text
> The 01conversions.t fails since Date-Manip-6.49: > > $ prove -b -v t/01conversions.t > t/01conversions.t .. WARNING: the TZ Date::Manip config variable is > deprecated > and will be removed in March 2016. Please use > the SetDate or ForceDate config variables instead. > Use of uninitialized value $mod in concatenation (.) or string at > /usr/share/perl5/vendor_perl/Date/Manip/TZ.pm line 179. > Use of uninitialized value $mod in concatenation (.) or string at > /usr/share/perl5/vendor_perl/Date/Manip/TZ.pm line 180. > Use of uninitialized value $mod in concatenation (.) or string at > /usr/share/perl5/vendor_perl/Date/Manip/TZ.pm line 181. > ERROR: [config_var] invalid zone in SetDate: > > 1..6 > not ok 1 - Parse Date 'March 23, 2003' > > # Failed test 'Parse Date 'March 23, 2003'' > # at t/01conversions.t line 67. > # got: '2003-03-23T00:00:00.000000000 CET > # ' > # expected: '2003-03-23T00:00:00.000000000 EST > # ' > ok 2 - Parse Date 'March 23, 2003 12:00 US/Eastern' > not ok 3 - Format Date '2003-03-23T00:00:00' > > # Failed test 'Format Date '2003-03-23T00:00:00'' > # at t/01conversions.t line 73. > # got: '2003032309:00:00' > # expected: '2003032303:00:00' > not ok 4 - Format Date '2003-03-23T12:00:00' > > # Failed test 'Format Date '2003-03-23T12:00:00'' > # at t/01conversions.t line 73. > # got: '2003032321:00:00' > # expected: '2003032315:00:00' > ok 5 - Parse Duration 'months=38:days=0:minutes=-237:seconds=-2' > ok 6 - Format Duration 'months=38:days=0:minutes=-237:seconds=-2' > # Looks like you failed 3 tests of 6. > Dubious, test returned 3 (wstat 768, 0x300) > Failed 3/6 subtests
Possible workaround to make test pass: set the TZ environment variable to EST
Subject: Re: [rt.cpan.org #102670] Test fails with since Date-Manip-6.49
Date: Wed, 11 Mar 2015 14:34:00 +0100
To: Slaven_Rezic via RT <bug-DateTime-Format-DateManip [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
On Tue, Mar 10, 2015 at 03:10:49PM -0400, Slaven_Rezic via RT wrote: Show quoted text
> > Possible workaround to make test pass: set the TZ environment variable to EST >
Yes.
From 8a64bb4e3bb6c9a41e140d6e7c2c450cb0d8ec50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> Date: Wed, 11 Mar 2015 14:17:52 +0100 Subject: [PATCH] Set system time zone in test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 01conversions.t fails since Date-Manip-6.49 because it takes time zone from syste. Whether it's a bug or a feature, setting TZ enviroment variable makes the test happy. CPAN RT#102670 Signed-off-by: Petr Písař <ppisar@redhat.com> --- t/01conversions.t | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/t/01conversions.t b/t/01conversions.t index f4b308c..9f51b61 100644 --- a/t/01conversions.t +++ b/t/01conversions.t @@ -2,6 +2,11 @@ use strict; use Test::More; +## Set the system time zone because of CPAN RT#102670 +BEGIN { + $ENV{TZ}="US/Eastern"; +} + use DateTime::Format::DateManip; use DateTime; use Date::Manip; -- 2.1.0
Download (untitled)
application/pgp-signature 213b

Message body not shown because it is not plain text.

Show quoted text
> > Possible workaround to make test pass: set the TZ environment > > variable to EST
On Ubuntu 14.04.2 LTS I tried adding TZ to /etc/environment, which does in fact set the TZ environment variable within my shell, however, the warning and error persist. I tried both TZ=EST and TZ=US/Eastern. Date::Manip is up to date. (6.50) Any suggestions on how to resolve this issue would be greatly appreciated. Thanks. --dave http://dave.thehorners.com/
I was able to install today (Jun 6th, 2016) with: $ perl -le 'use Date::Manip; print Date::Manip->VERSION' 6.51 $ perl -le 'use DateTime::Format::DateManip; print DateTime::Format::DateManip->VERSION' 0.04 But sure seems like that workaround will break soon according to the deprecation warning: t/01conversions.t .. WARNING: the TZ Date::Manip config variable is deprecated and will be removed in March 2016. Please use the SetDate or ForceDate config variables instead. So, this: t/01conversions.t:Date_Init("TZ=$dm_tz"); would apparently be this: Date_Init( 'setdate=now,America/New_York' ); Is the module still being maintained?
On 2015-03-10 08:29:08, ppisar wrote: Show quoted text
> The 01conversions.t fails since Date-Manip-6.49:
I cannot reproduce the problem anymore with Date-Manip-6.54. Statistical analysis of reports from my smokers: **************************************************************** Regression 'mod:Date::Manip' **************************************************************** Name Theta StdErr T-stat [0='const'] 1.0000 0.1499 6.67 [1='eq_6.43'] -0.9444 0.1657 -5.70 [2='eq_6.46'] -0.3750 0.1836 -2.04 [3='eq_6.47'] 0.0000 0.1666 0.00 [4='eq_6.48'] 0.0000 0.1836 0.00 [5='eq_6.49'] -0.6316 0.1576 -4.01 [6='eq_6.50'] -0.7273 0.1751 -4.15 [7='eq_6.51'] -1.0000 0.1774 -5.64 [8='eq_6.52'] -1.0000 0.1879 -5.32 [9='eq_6.53'] -1.0000 0.1774 -5.64 [10='eq_6.54'] 0.0000 0.1585 0.00 R^2= 0.664, N= 165, K= 11 ****************************************************************
Subject: Re: [rt.cpan.org #102670] Test fails with since Date-Manip-6.49
Date: Thu, 9 Jun 2016 08:37:25 +0200
To: Slaven_Rezic via RT <bug-DateTime-Format-DateManip [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
On Wed, Jun 08, 2016 at 02:07:48PM -0400, Slaven_Rezic via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=102670 > > > On 2015-03-10 08:29:08, ppisar wrote:
> > The 01conversions.t fails since Date-Manip-6.49:
> > I cannot reproduce the problem anymore with Date-Manip-6.54. >
I confirm current code works for me since Date-Manip-6.50. -- Petr