--- smeserver-mailstats-0.0.3/root/usr/bin/spamfilter-stats-7.pl.reworkDateManip 2008-10-03 18:38:07.000000000 +0200 +++ smeserver-mailstats-0.0.3/root/usr/bin/spamfilter-stats-7.pl 2008-10-03 19:02:12.000000000 +0200 @@ -272,7 +272,8 @@ use Pod::Usage; use POSIX qw/strftime floor/; use Time::Local; -use Date::Manip; +#use Date::Manip; +use Date::Parse; use Time::TAI64; use esmith::ConfigDB; use esmith::DomainsDB; @@ -305,8 +306,6 @@ timezone => `date +%z`, ); -Date_Init("TZ=$opt{'timezone'}"); - my $FetchmailIP = '127.0.0.200'; #Apparent Ip address of fetchmail deliveries my $WebmailIP = '127.0.0.1'; #Apparent Ip of Webmail sender my $localhost = 'localhost'; #Apparent sender for webmail @@ -1126,8 +1125,12 @@ }; $time = timelocal($sec,$min,$hour,$mday,$mon,$year) } - my $start = UnixDate( $startdate, "%s" ); - my $end = $enddate ? UnixDate( $enddate, "%s" ) : + + print STDOUT $startdate; + print STDOUT $enddate; + + my $start = str2time( $startdate ); + my $end = $enddate ? str2time( $enddate ) : $startdate ? $start + $secsininterval : $time; $start = $startdate ? $start : $end - $secsininterval; return ( $start > $end ) ? ( $end, $start ) : ( $start, $end );