projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix report day selection on daylight savings boundaries, RT#21879
[freeside.git]
/
FS
/
FS
/
Misc
/
DateTime.pm
diff --git
a/FS/FS/Misc/DateTime.pm
b/FS/FS/Misc/DateTime.pm
index
99ff409
..
2fff906
100644
(file)
--- 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 base qw( Exporter );
use vars qw( @EXPORT_OK );
-use POSIX;
use Carp;
use Carp;
+use Time::Local;
use Date::Parse;
use DateTime::Format::Natural;
use FS::Conf;
use Date::Parse;
use DateTime::Format::Natural;
use FS::Conf;
@@
-49,7
+49,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.
#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, $tz);
}
} else {
return str2time($string, $tz);
@@
-69,7
+69,7
@@
sub day_end {
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime($time);
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
}
=back