diff options
author | jeff <jeff> | 2010-09-24 17:23:35 +0000 |
---|---|---|
committer | jeff <jeff> | 2010-09-24 17:23:35 +0000 |
commit | ca6c79c8b9d29c09155485ac65dffee549bd74ee (patch) | |
tree | d9c69d3a9679500336f1f41b210b99b76c5b9441 /bin | |
parent | b978a889dbdc5116775169cb2b19cb34eb8c6fcd (diff) |
set the bill date earlier
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/opensrs_domain_pkgs | 18 |
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; |