Nothing like a new year to find bugs! There is a bug in
DateFormat.pm -- it does not print leading zeroes. Also, it is
formatted as a string instead of a number.
Test program:
use Log::Log4perl::DateFormat;
my $format = Log::Log4perl::DateFormat->new("yyyy-DDD-HH:mm:ss");
my $time = time();
print $format->format($time), "\n";
=> 2007- 5-09:38:44
patch:
@@ -192,7 +192,7 @@
######################
} elsif($first eq "D") {
push @{$self->{stack}}, [7, sub { $_[0] + 1}];
- return "%${len}s";
+ return "%0" . $len . "d";
######################
#a - am/pm marker #
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Robert Jacobson ..........................
Flight Ops. Team Solar Dynamics Observatory (SDO)
............. ..............
|