[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 4ff563bad0dd485262af7994eca593d4320db054

Ivan ivan at 420.am
Tue Mar 19 15:42:42 PDT 2013


The branch, FREESIDE_2_3_BRANCH has been updated
       via  4ff563bad0dd485262af7994eca593d4320db054 (commit)
      from  12486600a342b8c8e8e670fedc075b064faa90cd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4ff563bad0dd485262af7994eca593d4320db054
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Mar 19 15:42:41 2013 -0700

    fix report day selection on daylight savings boundaries, RT#21879

diff --git a/FS/FS/Misc/DateTime.pm b/FS/FS/Misc/DateTime.pm
index 5ef760d..1c023f9 100644
--- a/FS/FS/Misc/DateTime.pm
+++ b/FS/FS/Misc/DateTime.pm
@@ -2,8 +2,8 @@ package FS::Misc::DateTime;
 
 use base qw( Exporter );
 use vars qw( @EXPORT_OK );
-use POSIX;
 use Carp;
+use Time::Local;
 use Date::Parse;
 use DateTime::Format::Natural;
 use FS::Conf;
@@ -48,7 +48,7 @@ sub parse_datetime {
       #carp "WARNING: can't parse date: ". $parser->error;
       #return '';
       #huh, very common, we still need the "partially" (fully enough for our purposes) parsed date.
-      $dt->epoch;
+      return $dt->epoch;
     }
   } else {
     return str2time($string);
@@ -68,7 +68,7 @@ sub day_end {
 
     my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
         localtime($time);
-    mktime(59,59,23,$mday,$mon,$year,$wday,$yday,$isdst);
+    timelocal(59,59,23,$mday,$mon,$year);
 }
 
 =back

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Misc/DateTime.pm |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list