summaryrefslogtreecommitdiff
path: root/bin/opensrs_domain_pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'bin/opensrs_domain_pkgs')
-rwxr-xr-xbin/opensrs_domain_pkgs18
1 files changed, 17 insertions, 1 deletions
diff --git a/bin/opensrs_domain_pkgs b/bin/opensrs_domain_pkgs
index ae1476104..242009550 100755
--- a/bin/opensrs_domain_pkgs
+++ b/bin/opensrs_domain_pkgs
@@ -73,7 +73,23 @@ foreach my $svc_domain ( $part_export->svc_x ) {
second => $second,
time_zone => 'America/New_York',#timezone of opensrs
);
- my $expiretime = $exp->epoch;
+ #my $expiretime = $exp->epoch;
+
+ #set the bill date early enough to allow a couple chances to pay
+ $month--;
+ if ($month < 1) {
+ $year--;
+ $month=12;
+ }
+ my $bill = DateTime->new( year => $year,
+ month => $month,
+ day => 1,
+ hour => 0,
+ minute => 0,
+ second => 0,
+ time_zone => 'America/Chicago',#timezone of customer
+ );
+ my $expiretime = $bill->epoch;
my $error = $part_export->is_supported_domain($svc_domain);
warn $error if $error;