# %time3 Date and time with format: Mon dd hh:mm:ss or Mon dd hh:mm:ss yyyy
# %time4 Date and time with unix timestamp format: dddddddddd
# %time5 Date and time with format iso: yyyy-mm-ddThh:mm:ss, with optional timezone specification (ignored)
+# %time6 Date and time with format: dd/mm/yyyy, hh:mm:ss
# %methodurl Method and URL with format: "GET /index.html HTTP/x.x"
# %methodurlnoprot Method and URL with format: "GET /index.html"
# %method Method with format: GET
$PerlParsingFormat .=
"([^$LogSeparatorWithoutStar]+T[^$LogSeparatorWithoutStar]+)(Z|[-+\.]\\d\\d[:\\.\\dZ]*)?";
}
+ elsif ( $f =~ /%time6$/ ) { # dd/mm/yyyy, hh:mm:ss - added additional type to format for IIS date -DWG 12/8/2008
+ $pos_date = $i;
+ $i++;
+ push @fieldlib, 'date';
+ $PerlParsingFormat .= "([^,]+,[^,]+)";
+ }
# Special for methodurl, methodurlprot and methodurlnoprot
elsif ( $f =~ /%methodurl$/ ) {
next;
}
+ # Reformat date for IIS date -DWG 12/8/2008
+ if($field[$pos_date] =~ /,/)
+ {
+ $field[$pos_date] =~ s/,//;
+ my @split_date = split(' ',$field[$pos_date]);
+ my @dateparts2= split('/',$split_date[0]);
+ my @timeparts2= split(':',$split_date[1]);
+ #add leading zero
+ for($dateparts2[0],$dateparts2[1], $timeparts2[0], $timeparts2[1], $timeparts2[2]) {
+ if($_ =~ /^.$/)
+ {
+ $_ = '0'.$_;
+ }
+
+ }
+
+ $field[$pos_date] = "$dateparts2[2]-$dateparts2[0]-$dateparts2[1] $timeparts2[0]:$timeparts2[1]:$timeparts2[2]";
+ }
+
$field[$pos_date] =~
tr/,-\/ \tT/::::::/s; # " \t" is used instead of "\s" not known with tr
my @dateparts =