Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the TimeDate CPAN distribution.

Report information
The Basics
Id: 92611
Status: open
Priority: 0/
Queue: TimeDate

People
Owner: Nobody in particular
Requestors: honir999 [...] gmail.com
Cc:
AdminCc:

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



From honir999 [...] gmail.com Fri Jan 31 05: 31:23 2014
MIME-Version: 1.0
X-Spam-Status: No, score=-2.449 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
X-Mailer: Forte Agent 6.00/32.1186
X-Spam-Flag: NO
content-type: text/plain; charset="utf-8"
Message-ID: <fltme91i5g4e9m67cn3gd81oesuer4346c [...] 4ax.com>
X-Received: by 10.14.221.129 with SMTP id r1mr805945eep.113.1391164272172; Fri, 31 Jan 2014 02:31:12 -0800 (PST)
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -2.449
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 976AC240EAB for <cpan-bug+TimeDate [...] hipster.bestpractical.com>; Fri, 31 Jan 2014 05:31:23 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QkJpteOIHdQZ for <cpan-bug+TimeDate [...] hipster.bestpractical.com>; Fri, 31 Jan 2014 05:31:22 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 85C312404D2 for <bug-TimeDate [...] rt.cpan.org>; Fri, 31 Jan 2014 05:31:22 -0500 (EST)
Received: (qmail 20149 invoked by alias); 31 Jan 2014 10:31:21 -0000
Received: from mail-ea0-f181.google.com (HELO mail-ea0-f181.google.com) (209.85.215.181) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Fri, 31 Jan 2014 02:31:16 -0800
Received: by mail-ea0-f181.google.com with SMTP id m10so2241041eaj.12 for <bug-TimeDate [...] rt.cpan.org>; Fri, 31 Jan 2014 02:31:12 -0800 (PST)
Received: from thing (smtp.sussexweb.net. [82.152.19.97]) by mx.google.com with ESMTPSA id v7sm34390924eel.2.2014.01.31.02.31.10 for <bug-TimeDate [...] rt.cpan.org> (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 31 Jan 2014 02:31:11 -0800 (PST)
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Delivered-To: cpan-bug+TimeDate [...] hipster.bestpractical.com
Subject: str2time wrong date when no year specified
Return-Path: <honir999 [...] gmail.com>
X-RT-Mail-Extension: timedate
X-Original-To: cpan-bug+TimeDate [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=uzhWLlvsiH6QOnwyX10AakUONXikhYCPZ8jynbpeF4A=; b=XyvSzSUA0MdU6+8JDEey7lpFMyPkJF/h1RUNDCb/e/0euSAm5Kw2tDvSEXru6nIts0 NN5YSN5r+dfK8uC25OgGVARewXgUx5VoY96GSMrcT5pF5kplN81hwZfFgqTJgEL13+Id qQ0xdtTPfSu0xZxfoqCa1ZzPa+lETDb4gGdITbCh/+gHV9N0M1KGQVrGuQWXZ8GbaRjQ 9d2wRMd7y1LvX5I34ZiIb75Ba46YqeWIAJmXLXryflZF9sm8wGqjdYo66+GIfW+wCP+g 4BSsT1zW0eS5zLvs3M5Ri413IqCHqEyj4wToIOCuaAwm8cnh1Kly7SwraQSLKgesVy2X uVnQ==
Date: Fri, 31 Jan 2014 10:31:43 +0000
X-Spam-Level:
To: bug-TimeDate [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
From: <honir999 [...] gmail.com>
X-RT-Original-Encoding: ascii
X-RT-Interface: Email
Content-Length: 603
Download (untitled) / with headers
text/plain 603b
Parsing dates when no year specified, for a future month generates wrong year. perl -e "use Date::Parse; print str2time('31 Jan');" 1391126400 i.e. Fri, 31 Jan 2014 00:00:00 GMT but perl -e "use Date::Parse; print str2time('1 Feb');" 1359676800 i.e. Fri, 01 Feb 2013 00:00:00 GMT Wrong year: expected output 1391212800 i.e. Sat, 01 Feb 2014 00:00:00 GMT Code causing the error is line 252, which is always subtracting 1 from the year for a future month when the year is undefined. $year = ($month > $lt[4]) ? ($lt[5] - 1) : $lt[5] unless(defined $year); Date::Parse 2.30 perl, v5.8.8
X-RT-Interface: REST
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
RT-Message-ID: <rt-4.0.18-1275-1579123552-1.92611-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 79


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.