Skip Menu |

This queue is for tickets about the Date-Manip CPAN distribution.

Report information
The Basics
Id: 52591
Status: resolved
Priority: 0/
Queue: Date-Manip

People
Owner: Nobody in particular
Requestors: gilles.lamiral [...] laposte.net
Cc:
AdminCc:

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



CC: imapsync [...] linux-france.org
Subject: %z change in 6.x breaks rfc 2822 (email) date format and strftime(3) compatibility
Date: Wed, 09 Dec 2009 02:07:33 +0100
To: bug-Date-Manip [...] rt.cpan.org
From: Gilles LAMIRAL <gilles.lamiral [...] laposte.net>
Hello, First thanks to develop this perl module Date::Manip, it is very useful. I use this module to clean email "Date:" header, like this: $d = UnixDate(ParseDate($d), "%d-%b-%Y %H:%M:%S %z"); Like it is said on page http://search.cpan.org/~sbeck/Date-Manip-6.04/lib/Date/Manip/Changes5to6.pod %z format changed: %z format In Date::Manip 5.xx, the %z format would give an offset in the form: -0500. Now it gives it in the form: -05:00:00 I don't know why the change was made, may be for a good reason. The change breaks the date email format. http://www.faqs.org/rfcs/rfc2822.html 3.3. Date and Time Specification [...] zone = (( "+" / "-" ) 4DIGIT) / obs-zone It also breaks the strftime function compatibility. Here is the man page: man 3 strftime [...] %z The time-zone as hour offset from GMT. Required to emit RFC 822-conformant dates (using "%a, %d %b %Y %H:%M:%S %z"). (GNU) I suggest to use another letter than %z to give the new form -05:00:00 and keep %z for the form -0500. If you disagree we still need to have the old behavior to avoid ugly workaround with Date::Manip::VERSION. All C and rfc2822 coders (and their program users) will complain about this change. If this bug is already fixed, I'm sorry to mention it (I didn't find it in the bug list). Thanks in advance for your feedback, and thanks again for developing free software. -- Au revoir, 02 99 64 31 77 Gilles Lamiral. France, Chavagne (35310) 06 20 79 76 06
I agree that this was a bad change. I've changed %z back and added %N which prints out the full offset. 6.05 (which will be released pretty soon) will restore the old behavior.
Subject: Re: [rt.cpan.org #52591] %z change in 6.x breaks rfc 2822 (email) date format and strftime(3) compatibility
Date: Fri, 11 Dec 2009 01:45:24 +0100
To: bug-Date-Manip [...] rt.cpan.org
From: Gilles LAMIRAL <gilles.lamiral [...] laposte.net>
Hello Sullivan, Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=52591> > I agree that this was a bad change. > I've changed %z back and added %N which prints out the full offset.
I thank you very much. -- Au revoir, 02 99 64 31 77 Gilles Lamiral. France, Chavagne (35310) 06 20 79 76 06
Subject: Re: [rt.cpan.org #52591] Resolved: %z change in 6.x breaks rfc 2822 (email) date format and strftime(3) compatibility
Date: Wed, 16 Dec 2009 07:53:09 +0100
To: bug-Date-Manip [...] rt.cpan.org
From: Gilles LAMIRAL <gilles.lamiral [...] laposte.net>
Hello Sullivan, Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=52591 > > > According to our records, your request has been resolved. If you have any > further questions or concerns, please respond to this message.
Thanks for the change back! -- Au revoir, 02 99 64 31 77 Gilles Lamiral. France, Chavagne (35310) 06 20 79 76 06