/[smecontribs]/rpms/smeserver-mailstats/contribs7/smeserver-mailstats-0.0.3-reworkDateManip.patch
ViewVC logotype

Annotation of /rpms/smeserver-mailstats/contribs7/smeserver-mailstats-0.0.3-reworkDateManip.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Fri Oct 3 17:05:20 2008 UTC (16 years, 1 month ago) by snetram
Branch: MAIN
CVS Tags: smeserver-mailstats-0_0_3-10_el4_sme, smeserver-mailstats-0_0_3-9_el4_sme
* Fri Oct  3 2008 Jonathan Martens <smeserver-contribs@snetram.nl< 0.0.3-8
- Remove use of Date::Manip from spamfilter-stats-7.pl [SME: 3631]

1 snetram 1.1 --- smeserver-mailstats-0.0.3/root/usr/bin/spamfilter-stats-7.pl.reworkDateManip 2008-10-03 18:38:07.000000000 +0200
2     +++ smeserver-mailstats-0.0.3/root/usr/bin/spamfilter-stats-7.pl 2008-10-03 19:02:12.000000000 +0200
3     @@ -272,7 +272,8 @@
4     use Pod::Usage;
5     use POSIX qw/strftime floor/;
6     use Time::Local;
7     -use Date::Manip;
8     +#use Date::Manip;
9     +use Date::Parse;
10     use Time::TAI64;
11     use esmith::ConfigDB;
12     use esmith::DomainsDB;
13     @@ -305,8 +306,6 @@
14     timezone => `date +%z`,
15     );
16    
17     -Date_Init("TZ=$opt{'timezone'}");
18     -
19     my $FetchmailIP = '127.0.0.200'; #Apparent Ip address of fetchmail deliveries
20     my $WebmailIP = '127.0.0.1'; #Apparent Ip of Webmail sender
21     my $localhost = 'localhost'; #Apparent sender for webmail
22     @@ -1126,8 +1125,12 @@
23     };
24     $time = timelocal($sec,$min,$hour,$mday,$mon,$year)
25     }
26     - my $start = UnixDate( $startdate, "%s" );
27     - my $end = $enddate ? UnixDate( $enddate, "%s" ) :
28     +
29     + print STDOUT $startdate;
30     + print STDOUT $enddate;
31     +
32     + my $start = str2time( $startdate );
33     + my $end = $enddate ? str2time( $enddate ) :
34     $startdate ? $start + $secsininterval : $time;
35     $start = $startdate ? $start : $end - $secsininterval;
36     return ( $start > $end ) ? ( $end, $start ) : ( $start, $end );

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed