Your message dated Fri, 16 Aug 2013 01:31:53 +0200
with message-id <[email protected]>
and subject line Re: libtimedate-perl: Doesn't respect locale when parsing 
short dates (nn/nn/nn)
has caused the Debian Bug report #557738,
regarding libtimedate-perl: RFC2822 dates with 2-digit year are not parsed 
correctly (regression)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
557738: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557738
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libtimedate-perl
Version: 1.1900-1
Severity: normal

With libtimedate-perl 1.1600-9:

$ perl -MDate::Parse -e \
  'print gmtime(str2time("26 Apr 07 21:38:23 -0700"))."\n"'
Fri Apr 27 04:38:23 2007

This is OK. But with libtimedate-perl 1.1900-1:

$ perl -MDate::Parse -e \
  'print gmtime(str2time("26 Apr 07 21:38:23 -0700"))."\n"'
Sat Apr 27 04:38:23 1907

The year is incorrect.

Even though a 2-digit year may be ambiguous (still generated by some
software unfortunately), 2007 is the correct interpretation.

I suggest to use the rule specified by the RFC 2822:

   Where a two or three digit year occurs in a date, the year is to be
   interpreted as follows: If a two digit year is encountered whose
   value is between 00 and 49, the year is interpreted by adding 2000,
   ending up with a value between 2000 and 2049.  If a two digit year is
   encountered with a value between 50 and 99, or any three digit year
   is encountered, the year is interpreted by adding 1900.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages libtimedate-perl depends on:
ii  perl                          5.10.1-8   Larry Wall's Practical Extraction 

libtimedate-perl recommends no packages.

libtimedate-perl suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Version: 1.2000-1

On 2013-08-16 01:28:41 +0200, Vincent Lefevre wrote:
> This is obviously not the same bug as the other ones. Bug 557738
> has actually been fixed. The problem was due to the $year+1900 in
> 
>   http://cpansearch.perl.org/src/GBARR/TimeDate-1.19/lib/Date/Parse.pm
> 
> (module version 2.29). The "+1900" has been removed in
> 
>   http://cpansearch.perl.org/src/GBARR/TimeDate-2.30/lib/Date/Parse.pm
> 
> (module version 2.30), and the called function does the right
> 2-digit -> 4-digit conversion.

and libtimedate-perl 1.2000-1 has the fixed version:

$ perl -MDate::Parse -e \
  'print gmtime(str2time("26 Apr 07 21:38:23 -0700"))."\n"'
Fri Apr 27 04:38:23 2007

-- 
Vincent Lefèvre <[email protected]> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

--- End Message ---

Reply via email to