Merge pull request #71 in FS/freeswitch from ~RTRELEAVEN/freeswitch-fs-4762-1:fs-4762 to master

* commit '139b03204550cd394877da882fec49b08eba08fa':
  improve regular expression to parse Jerusalem timezone files
This commit is contained in:
Mike Jerris 2014-09-30 09:55:56 -05:00
commit f3473fdb58
1 changed files with 3 additions and 6 deletions

View File

@ -55,16 +55,13 @@ foreach my $name ( sort( keys(%name_to_file) ) ) {
my $data = join( "", <$in> ); my $data = join( "", <$in> );
close($in); close($in);
if ( $data !~ /^TZif/o ) { my @strings = $data =~ (m/[ -~]{4,}/g);
if ( shift(@strings) !~ /^TZif/o ) {
$debug && print "Skipped $file\n"; $debug && print "Skipped $file\n";
next; next;
} }
my $tmp = $data; $zones{$name} = pop(@strings);
$tmp =~ s/\n$//s;
$tmp =~ s/.*\n//sgmo;
$zones{$name} = $tmp;
} }
open( my $out, ">$output" ); open( my $out, ">$output" );