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