Index: wwwroot/cgi-bin/awstats.pl =================================================================== RCS file: /cvsroot/gsgforge/gforge/awstats/wwwroot/cgi-bin/awstats.pl,v retrieving revision 1.1 diff -C3 -r1.1 awstats.pl *** wwwroot/cgi-bin/awstats.pl 6 Jan 2005 19:37:27 -0000 1.1 --- wwwroot/cgi-bin/awstats.pl 6 Jan 2005 19:42:53 -0000 *************** *** 6066,6072 **** # Now @dateparts is (DD,MM,YYYY,HH,MM,SS) and we're going to create $timerecord=YYYYMMDDHHMMSS # Plugin call : Convert a @datepart into another @datepart ! if ($PluginsLoaded{'ChangeTime'}{'timezone'}) { @dateparts=ChangeTime_timezone(\@dateparts); } my $yearrecord=int($dateparts[2]); my $monthrecord=int($dateparts[1]); my $hourrecord=int($dateparts[3]); --- 6066,6074 ---- # Now @dateparts is (DD,MM,YYYY,HH,MM,SS) and we're going to create $timerecord=YYYYMMDDHHMMSS # Plugin call : Convert a @datepart into another @datepart ! my $tz; ! if ( $pos_tz ) { $tz = $field[$pos_tz]; }; ! if ($PluginsLoaded{'ChangeTime'}{'timezone'}) { @dateparts=ChangeTime_timezone(\@dateparts,$tz); } my $yearrecord=int($dateparts[2]); my $monthrecord=int($dateparts[1]); my $hourrecord=int($dateparts[3]); Index: wwwroot/cgi-bin/plugins/timezone.pm =================================================================== RCS file: /cvsroot/gsgforge/gforge/awstats/wwwroot/cgi-bin/plugins/timezone.pm,v retrieving revision 1.1 diff -C3 -r1.1 timezone.pm *** wwwroot/cgi-bin/plugins/timezone.pm 6 Jan 2005 19:37:41 -0000 1.1 --- wwwroot/cgi-bin/plugins/timezone.pm 6 Jan 2005 19:20:58 -0000 *************** *** 47,53 **** # <----- # ENTER HERE CODE TO DO INIT PLUGIN ACTIONS ! if (! $InitParams || int($InitParams) == 0) { return "Error: Disable plugin if TimeZone is 0 (Plugin useless)"; } # We do not need this plugin if TZ=0 $PluginTimeZoneSeconds=(int($InitParams)*3600); # -----> --- 47,54 ---- # <----- # ENTER HERE CODE TO DO INIT PLUGIN ACTIONS ! # if (! $InitParams || int($InitParams) == 0) { return "Error: Disable plugin if TimeZone is 0 (Plugin useless)"; } # We do not need this plugin if TZ=0 ! if (! $InitParams ) { $InitParams = 0; }; $PluginTimeZoneSeconds=(int($InitParams)*3600); # -----> *************** *** 63,69 **** #----------------------------------------------------------------------------- sub ChangeTime_timezone { my $dateparts=shift; ! my ($nsec,$nmin,$nhour,$nmday,$nmon,$nyear,$nwday) = localtime(Time::Local::timelocal(int(@$dateparts[5]), int(@$dateparts[4]), int(@$dateparts[3]), int(@$dateparts[0]), int(@$dateparts[1])-1, int(@$dateparts[2])-1900) + $PluginTimeZoneSeconds); return ($nmday, $nmon+1, $nyear+1900, $nhour, $nmin, $nsec); } --- 64,77 ---- #----------------------------------------------------------------------------- sub ChangeTime_timezone { my $dateparts=shift; ! my $tz = shift; ! ! my $secs = Time::Local::timelocal(int(@$dateparts[5]), int(@$dateparts[4]), int(@$dateparts[3]), int(@$dateparts[0]), int(@$dateparts[1])-1, int(@$dateparts[2])-1900); ! if ( $tz ) { ! $secs -= (int($tz)*3600)/100; ! } ! $secs += $PluginTimeZoneSeconds; ! my ($nsec,$nmin,$nhour,$nmday,$nmon,$nyear,$nwday) = localtime($secs); return ($nmday, $nmon+1, $nyear+1900, $nhour, $nmin, $nsec); }