--- ps2rrd.pl 2009/07/16 19:20:07 8 +++ ps2rrd.pl 2009/07/17 10:34:42 9 @@ -5,7 +5,7 @@ use Data::Dump qw/dump/; use RRD::Simple; -use DateTime; +use POSIX qw/mktime/; my $debug = 0; my $zoom = 2; @@ -22,16 +22,7 @@ print STDERR "."; - my $t = (stat($file))[9]; - if ( $file =~ m{(\d\d\d\d)-(\d\d)-(\d\d)/(\d\d)(\d\d)} ) { - $t = new DateTime( - year => $1, - month => $2, - day => $3, - hour => $4, - minute => $5, - )->epoch; - } + my $t = mktime( 0, $5, $4, $3, $2 - 1, $1 - 1900 ) if $file =~ m{(\d\d\d\d)-(\d\d)-(\d\d)/(\d\d)(\d\d)}; warn "# $file ", -s $file, " bytes [$t]\n" if $debug;