projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
freeside-pkg-date-midnight: docs, RT12570
[freeside.git]
/
FS
/
bin
/
freeside-pkg-date-midnight
diff --git
a/FS/bin/freeside-pkg-date-midnight
b/FS/bin/freeside-pkg-date-midnight
index
c1dbd5d
..
ad6ea59
100755
(executable)
--- a/
FS/bin/freeside-pkg-date-midnight
+++ b/
FS/bin/freeside-pkg-date-midnight
@@
-5,6
+5,7
@@
use Getopt::Std;
use FS::UID qw(adminsuidsetup);
use FS::Record qw(qsearch qsearchs dbh);
use Data::Dumper;
use FS::UID qw(adminsuidsetup);
use FS::Record qw(qsearch qsearchs dbh);
use Data::Dumper;
+use Date::Manip::Date;
use POSIX;
&untaint_argv; #what it sounds like (eww)
use POSIX;
&untaint_argv; #what it sounds like (eww)
@@
-25,6
+26,11
@@
while ( $row = $sth->fetchrow_hashref ) {
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime($bill);
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime($bill);
+ my $date = new Date::Manip::Date;
+ my $err = $date->parse($bill);
+
+ my $datefixed = $date->calc(?,1);
+
if ( $hour != 0 || $min != 0 || $sec != 0 ) {
$hour = 0;
$min = 0;
if ( $hour != 0 || $min != 0 || $sec != 0 ) {
$hour = 0;
$min = 0;
@@
-71,12
+77,6
@@
freeside-pkg-date-midnight - change the time portion of next bill dates on all a
user - name of an internal Freeside user
user - name of an internal Freeside user
-=head1 BUGS
-
-Will be off by an hour when crossing DST boundaries, defeating the purpose of
-the util. Workaround: run it a day after each DST change (so twice per year
-for time zones subject to DST).
-
=head1 SEE ALSO
L<FS::cust_pkg>
=head1 SEE ALSO
L<FS::cust_pkg>