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

Fwd: Possible Bug in DateTime



Hi,

Got this a month ago but had no time to take care of it myself. Can
one of you look at it? :-)

Cheers,

Jonathan

---------- Forwarded message ----------
From: Ulf Kreutzberg <ulf.kreutzberg@hosteurope.de>
Date: Mon, Sep 5, 2011 at 6:26 PM
Subject: Possible Bug in DateTime
To: jawnsy@cpan.org


Hello Jonathan,


I hope it is OK for you to inform you this way regarding a possible bug
in DateTime (I have not verified if newer versions already have fixed this).
I am using libdatetime-perl as a debian Package under Debian/Lenny
(32-bit) and also Ubuntu 10.04.3 LTS

Latest changelog:
libdatetime-perl (2:0.5200-1) unstable; urgency=low

 * New upstream release
 * Test-Pod and Test-Pod-Coverage are now moved to xt/
 * Refresh copyright and control files
 * Removed RELEASE_TESTING override, no longer needed

 -- Jonathan Yu <jawnsy@cpan.org>  Sat, 05 Dec 2009 16:48:14 -0500

the Bug:

DateTime->now->month does not show the actual month shortly after a
month has changed, still returns the former one, please notice the
following example:

# ==============
#!/usr/bin/perl
# script name: testdate.pl
use DateTime;
my $date = DateTime->now;
printf "Date: %s-%s\n",$date->year, $date->month;
# ==============

..going to Bash:
#> date
Di 6. Sep 00:09:18 CEST 2011
The script delivers correctly:
Date: 2011-9

#> date
Do 1. Sep 00:09:15 CEST 2011
The script delivers wrongly:
Date: 2011-8

Like DateTime->month_0 would do.

This behavior can also be reproduced under Debian/Lenny, 32bit, DateTime
0.42

Best regards from Cologne, Germany,
Ulf

--
Ulf Kreutzberg
Senior System Administrator Webhosting

E-Mail: ulf.kreutzberg@hosteurope.de
Telefon: +49 2203 1045-7355
Fax: +49 180 5 66 3233 (*)

-----------------------------------------------------------------------
Host Europe GmbH - http://www.hosteurope.de
Welserstraße 14 - 51149 Köln - Germany
Telefon: 0800 467 8387 - Fax: +49 180 5 66 3233 (*)
HRB 28495 Amtsgericht Köln - USt-IdNr.: DE187370678
Geschäftsführer: Patrick Pulvermüller, Thomas Vollrath

(*) 0,14 EUR/Min. aus dem dt. Festnetz; maximal 0,42 EUR/Min. aus
den dt. Mobilfunknetzen


Reply to: