diff options
author | levinse <levinse> | 2011-06-16 00:33:30 +0000 |
---|---|---|
committer | levinse <levinse> | 2011-06-16 00:33:30 +0000 |
commit | 0b16a9ca39fb0420bc43a329d6505ec25ab24815 (patch) | |
tree | f33ffcbdb2cebca85dadb219a4900cd1bc7dc614 | |
parent | abae865e1d85d3200058bfab21b75a5a45ed247c (diff) |
DID inventory/import / bulk DID orders - phase 2, RT12754
-rw-r--r-- | bin/import-did-inventory | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/import-did-inventory b/bin/import-did-inventory index 19a9c0c18..03c892f46 100644 --- a/bin/import-did-inventory +++ b/bin/import-did-inventory @@ -94,11 +94,12 @@ $latas{460} = 'SOUTHEAST FL GR-EA'; $latas{952} = 'TAMPA FLORIDA'; $latas{524} = 'KANSAS CITY'; +my $parser = new DateTime::Format::Natural( 'time_zone' => 'local' ); sub parsedt { my ($dt,$min,$max) = (shift,shift,shift); - my $parser = new DateTime::Format::Natural( 'time_zone' => 'local' ); + $dt = "$dt 00:00:00"; my $epoch = $parser->parse_datetime($dt); - warn "dt=$dt min=$min max=$max epoch=$epoch\n"; + warn "dt='$dt' min=$min max=$max epoch=$epoch\n"; return $epoch->epoch if ($parser->success && $epoch->epoch >= $min && $epoch->epoch <= $max); fatal("invalid date $dt (min=$min, max=$max)"); |