Subject: | Can't parse Format like: Thu Sep 1 10:07:00 2005 |
Hi!
I hope I'm at the right place.
I want to report a bug in Date::Parse.
$VERSION = "2.27";
written by Graham Barr
OS is Debian sarge.
perl, v5.8.4 built for i386-linux-thread-multi
Kernel: 2.6.7-1-386
I grep the modification Date from a pdf-File like
1 #!/bin/bash
2 DATE=`pdfinfo foo.pdf | grep "ModDate:"`
3 NAME=`~/bin/mydatef.pl $DATE`
Result is: ModDate: Thu Sep 1 10:07:00 2005
1 #!/usr/local/bin/perl
2 my $p;
3
4 for (my $i=1;$i<scalar(@ARGV)-1;$i++){$p.=$ARGV[$i]." ";};
5
6 use Date::Parse;
7 # ModDate: Thu Sep 1 10:07:00 2005
8 $time = str2time($p);
9 ($ss,$mm,$hh,$day,$month,$year,$zone) = strptime($p);
10 print "($ss,$mm,$hh,date=$day,month=$month,year=$year,z=$zone)\n";
Result is:
(00,07,10,d=1,m=8,y=,z=)
So I can't get month (or I have to increase the month), but the year is lost.
Ok, that is't listened in the EXAMPLE DATES-Section in the documentation, but perhaps it can be build in.
Sorry about my horrible grammar.
Greetings,
Rainer