]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Fixed died error when analyzing december log files since new feature "visits duration".
authoreldy <>
Fri, 17 May 2002 04:45:35 +0000 (04:45 +0000)
committereldy <>
Fri, 17 May 2002 04:45:35 +0000 (04:45 +0000)
wwwroot/cgi-bin/awstats.pl

index b2b33bc0cecc03cdf74cc8d42465f903d483476f..c38b1affa56ce82e30ada14284d87081bdc8870f 100644 (file)
@@ -663,8 +663,8 @@ sub DateIsValid {
 #------------------------------------------------------------------------------
 sub SessionLastToSessionRange {
        my $starttime = my $endtime;
-       if (shift =~ /(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/) { $endtime = Time::Local::timelocal($6,$5,$4,$3,$2,$1); }
-       if (shift =~ /(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/) { $starttime = Time::Local::timelocal($6,$5,$4,$3,$2,$1); }
+       if (shift =~ /(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/) { $endtime = Time::Local::timelocal($6,$5,$4,$3,$2-1,$1); }
+       if (shift =~ /(\d\d\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/) { $starttime = Time::Local::timelocal($6,$5,$4,$3,$2-1,$1); }
        my $delay=$endtime-$starttime;
        debug("SessionLastToSessionRange $endtime - $starttime = $delay",4);
        if ($delay <= 30) { return $SessionsRange[0]; }
@@ -3074,7 +3074,7 @@ if ($UpdateStats) {
                # Create $timerecord like YYYYMMDDHHMMSS
                #--- TZ START : Uncomment following 3 lines to made a timezone adjustment. Warning this reduce seriously AWStats speed.
 #              my $TZ=+2;
-#              my ($nsec,$nmin,$nhour,$nmday,$nmon,$nyear,$nwday) = localtime(Time::Local::timelocal($dateparts[5], $dateparts[4], $dateparts[3], $dateparts[0], $dateparts[1], $dateparts[2] + (3600*$TZ) ));
+#              my ($nsec,$nmin,$nhour,$nmday,$nmon,$nyear,$nwday) = localtime(Time::Local::timelocal($dateparts[5], $dateparts[4], $dateparts[3], $dateparts[0], $dateparts[1], $dateparts[2]) + (3600*$TZ));
 #              @dateparts = split(/:/, sprintf("%02u:%02u:%04u:%02u:%02u:%02u", $nmday, $nmon, $nyear+1900, $nhour, $nmin, $nsec)); 
                #--- TZ END : Uncomment following three lines to made a timezone adjustement. Warning this reduce seriously AWStats speed.
                my $timerecord=int($dateparts[2].$dateparts[1].$dateparts[0].$dateparts[3].$dateparts[4].$dateparts[5]);        # !!!