From d6244a2850a30ea44e3149909cd9f3a6fcc17b20 Mon Sep 17 00:00:00 2001 From: levinse Date: Thu, 16 Jun 2011 00:33:29 +0000 Subject: [PATCH] DID inventory/import / bulk DID orders - phase 2, RT12754 --- bin/import-did-inventory | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/import-did-inventory b/bin/import-did-inventory index 298e159f4..01fa2e8af 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)"); -- 2.11.0