X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fopensrs_domain_pkgs;h=2420095508804aa04ce5306f18f5d10473396f2c;hp=ae14761040721109d616222b3a906de209df1914;hb=368ed08e24400e9d1faf401a1e4e23ea54d2c969;hpb=a5cda9b76146da5c3a2c4f5c706c0b7a093a17ca 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;