#40 time3 correction

closed
None
5
2012-10-11
2003-12-27
Jochen Kalmbach
No

Can now parse the (new) "time3" format (Month DD
HH:MM:SS YYYY) like "Dec 24 20:42:49 2003".

diff -r1.690 awstats.pl
4708c4708
<
$PerlParsingFormat .= "(\w\w\w \s??\d+
\d\d:\d\d:\d\d)";


>
$PerlParsingFormat .= "(\w\w\w \s??\d+
\d\d:\d\d:\d\d \d\d\d\d)";
5774c5774
< # Split DD/Month/YYYY:HH:MM:SS or
YYYY-MM-DD HH:MM:SS or MM/DD/YY\tHH:MM:SS


> # Split "DD/Month/YYYY:HH:MM:SS"
or "YYYY-MM-DD HH:MM:SS" or "MM/DD/YY\tHH:MM:SS"
or "Month DD HH:MM:SS YYYY"
5778a5779
> elsif ($dateparts[0] =~ /^...$/) { my
$tmp=$dateparts[1]; $dateparts[1]=$dateparts[0];
$dateparts[0]=$tmp; $tmp=$dateparts[5]; $dateparts[5]
=$dateparts[4]; $dateparts[4]=$dateparts[3];
$dateparts[3]=$dateparts[2]; $dateparts[2]=$tmp; }

Discussion

  • Logged In: YES
    user_id=96898

    Added in CVS tree for next version.

     
  • Logged In: YES
    user_id=96898

    Added in last release version.
    So patch is no more needed.