/[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.3 - (hide annotations) (download)
Sat Oct 11 23:29:50 2008 UTC (16 years ago) by snetram
Branch: MAIN
CVS Tags: smeserver-mailstats-0_0_3-13_el4_sme, smeserver-mailstats-0_0_3-12_el4_sme
Changes since 1.2: +1 -4 lines
* Sun Oct 12 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 0.0.3-12
- Fix patches to apply cleanly [SME: 3631]
- Execute the database creation script as well [SME: 4275]
- TODO: Add createlinks script to source

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 snetram 1.2 @@ -272,7 +272,7 @@
4 snetram 1.1 use Pod::Usage;
5     use POSIX qw/strftime floor/;
6     use Time::Local;
7     -use Date::Manip;
8     +use Date::Parse;
9     use Time::TAI64;
10     use esmith::ConfigDB;
11     use esmith::DomainsDB;
12     @@ -305,8 +306,6 @@
13     timezone => `date +%z`,
14     );
15    
16     -Date_Init("TZ=$opt{'timezone'}");
17     -
18     my $FetchmailIP = '127.0.0.200'; #Apparent Ip address of fetchmail deliveries
19     my $WebmailIP = '127.0.0.1'; #Apparent Ip of Webmail sender
20     my $localhost = 'localhost'; #Apparent sender for webmail
21 snetram 1.3 @@ -1126,8 +1125,9 @@
22 snetram 1.1 };
23     $time = timelocal($sec,$min,$hour,$mday,$mon,$year)
24     }
25     - my $start = UnixDate( $startdate, "%s" );
26     - my $end = $enddate ? UnixDate( $enddate, "%s" ) :
27     +
28     + my $start = str2time( $startdate );
29     + my $end = $enddate ? str2time( $enddate ) :
30     $startdate ? $start + $secsininterval : $time;
31     $start = $startdate ? $start : $end - $secsininterval;
32     return ( $start > $end ) ? ( $end, $start ) : ( $start, $end );

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