[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [imapsync] BAD parse error: invalid digit in date string


From Gilles LAMIRAL <gilles dot lamiral at laposte dot net>
Subject Re: [imapsync] BAD parse error: invalid digit in date string
Date Wed, 09 Dec 2009 02:20:58 +0100

Hello Phil,

This seems to be a feature of Date::Manip v6.  See:
  http://search.cpan.org/dist/Date-Manip/lib/Date/Manip/Changes5to6.pod
>
%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've sent a bug report to Date::Manip bug list, imapsync@ in CC.


At a quick glance, it appears the author didn't provide any mechanism to output the IMAP required format but I may have missed something.

No this change is clearly a mistake, made like this: "this format %z doesn't look pretty good to me, I'm the current coder, I change it". (May be I'm wrong, we'll see).

Another problem with Date::Manip.
I don't know if the Carp::confess is still used in Date::Manip, I was
surprised a module decided to die my script on a very small problem.
The workaround is:

local *Carp::confess = sub { return undef; };

My code is ugly but that's not always my fault :-)

--
Au revoir,                               02 99 64 31 77
Gilles Lamiral. France, Chavagne (35310) 06 20 79 76 06