[Users] A bug (?) in template %D{%Z} symbol expansion

Ricardo Mones ricardo at mones.org
Sat Nov 19 13:48:59 CET 2011


On Sat, 19 Nov 2011 13:34:22 +0100
Colin Leroy <colin at colino.net> wrote:

> On 19 November 2011 at 11h45, pezcurrel wrote:
> 
> Hi, 
> 
> > Hello,
> > 
> > if I set a reply template like this...
> > 
> > On %D{%d/%m/%Y %H:%M (%Z)}...
> > 
> > ...and reply to a mail with a date of "Fri, 18 Nov 2011 12:15:41
> > -0500", while my timezone is +0100, I'll get...
> > 
> > On 18/11/2011 12:15 (CET)...
> > 
> > ...in my reply, but that "18/11/2011 12:15" is not "CET".
> > 
> > This happens with claws-mail 3.7.10 from claws-mail ppa on ubuntu
> > 10.04. A template like this...
> > 
> > On %D{%d/%m/%Y %H:%M (%z)}...
> > 
> > ...would instead produce...
> > 
> > On 18/11/2011 12:15 (-0500)...
> > 
> > ...which is right.
> 
> It looks like a strftime() bug. date gives me the same:
> 
> colin at marv:~/docs/cvs/claws$ date +'%Z'
> CET
> colin at marv:~/docs/cvs/claws$ date +'%z'
> +0100

  This is correct from strftime as you're in CET, but I think the OP
  refers the date on the mail belongs to a different TZ (-0500) but CM
  is not parsing it or is parsing it incorrectly and, as no timezone
  correction is applied to time, when generated with local timezone is
  not modified and therefore wrong (12:15 -0500 should be 06:15 CET). 

  Not sure this is a problem of the templates though.
-- 
  Ricardo Mones 
  ~
  Physics is like sex: sure, it may give some practical results, but 
  that's not why we do it.                            Richard Feynman

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.claws-mail.org/pipermail/users/attachments/20111119/cc01e10d/attachment.sig>


More information about the Users mailing list