Skip Menu |
 

This queue is for tickets about the TimeDate CPAN distribution.

Report information
The Basics
Id: 45067
Status: resolved
Priority: 0/
Queue: TimeDate

People
Owner: Nobody in particular
Requestors: emhn [...] usb.ve
Cc:
AdminCc:

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



CC: Graham Barr <gbarr [...] pobox.com>
MIME-Version: 1.0
X-Spam-Status: No, hits=-1.0 required=8.0 tests=RCVD_IN_DNSWL_LOW
X-Mailer: Evolution 2.22.3.1
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
X-Virus-Scanned: by amavisd-new
Message-ID: <1239832801.4183.76.camel [...] deepthought.ius.cc>
Content-Type: multipart/mixed; boundary="=-B4mpc8Mnu3kzekApm90z"
Reply-To: emhn [...] usb.ve
Organization: Universidad Simón Bolívar
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id 096894DCF97 for <bug-timedate [...] rt.cpan.org>; Wed, 15 Apr 2009 18:00:31 -0400 (EDT)
Received: (qmail 27571 invoked by uid 103); 15 Apr 2009 22:00:31 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 15 Apr 2009 22:00:31 -0000
Received: from akroyd.itverx.com.ve (HELO akroyd.itverx.com.ve) (67.205.93.243) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Wed, 15 Apr 2009 15:00:24 -0700
Received: from deepthought.ius.cc (201-211-88-228.genericrev.cantv.net [201.211.88.228] (may be forged)) by akroyd.itverx.com.ve (8.14.3/8.14.3/Debian-5) with ESMTP id n3FM09BE029553 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 15 Apr 2009 22:00:14 GMT
Received: from [127.0.0.1] (localhost [127.0.0.1]) by deepthought.ius.cc (8.14.3/8.14.3/Debian-5) with ESMTP id n3FM01h0026335; Wed, 15 Apr 2009 17:30:02 -0430
Delivered-To: cpan-bug+timedate [...] diesel.bestpractical.com
Subject: Date::Format with %z gives wrong results for half-hour timezones
Return-Path: <emhn [...] usb.ve>
X-Original-To: bug-timedate [...] rt.cpan.org
X-Spam-Check-BY: 16.mx.develooper.com
Date: Wed, 15 Apr 2009 17:30:01 -0430
X-Spam-Level: *
To: bug-timedate [...] rt.cpan.org
From: Ernesto Hernández-Novich <emhn [...] usb.ve>
Content-Length: 0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-RT-Original-Encoding: utf-8
Content-Length: 1147
Download (untitled) / with headers
text/plain 1.1k
Using Date::Format to format a date including the timezone as an offset (%z) does not work correctly if the offset is not an even number of hours. I noticed the problem since I run my systems using VET (-4:30) and several mail Date: headers built with Date::Format broke. print time2str("%Z %z", $^T, "-0430") gives -0430 -041800 instead of -0430 -0430 The bug is in line 239 of Date/Format.pm in function format_z, and I've fixed it with sprintf("%+03d%02d", int($o / 3600), int(abs($o) % 3600) / 60); It also works for timezones with other weird offsets like +1245 (Catham Islands) +0545 (Kathmandu) and I even tried with things like -0417. Attached a simple test for the bug. This bus is breaking RequestTracker 3.6 and 3.8 if the system runs on any timezone that's not a round number of hours. This bug is also reported in Debian BTS [1]. [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524136 -- Prof. Ernesto Hernández-Novich - MYS-220C Geek by nature, Linux by choice, Debian of course. If you can't aptitude it, it isn't useful or doesn't exist. GPG Key Fingerprint = 438C 49A2 A8C7 E7D7 1500 C507 96D6 A3D6 2F4C 85E3
content-type: application/x-perl; name="z.t"
content-disposition: attachment; filename="z.t"
Content-Transfer-Encoding: 7bit
Content-Length: 529
Download z.t
text/x-perl 529b

Message body is not shown because sender requested not to inline it.



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.