Skip to content

Commit

Permalink
move test for missing zip code earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael J. Radwin authored and Michael J. Radwin committed Jul 17, 2015
1 parent 485e1f7 commit 832e6ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions local/bin/shabbat_weekly.pl
Original file line number Diff line number Diff line change
Expand Up @@ -557,13 +557,13 @@ sub parse_config {
my($latitude,$longitude,$tzid);
if (defined $cfg->{zip}) {
my($CityMixedCase,$State,$Latitude,$Longitude,$TimeZone,$DayLightSaving) = get_zipinfo($cfg->{zip});
$latitude = $Latitude;
$longitude = $Longitude;
$tzid = Hebcal::get_usa_tzid($State,$TimeZone,$DayLightSaving);
unless (defined $State) {
WARN("unknown zipcode=$cfg->{zip} for to=$to, id=$cfg->{id}");
return undef;
}
$latitude = $Latitude;
$longitude = $Longitude;
$tzid = Hebcal::get_usa_tzid($State,$TimeZone,$DayLightSaving);
$city_descr = "$CityMixedCase, $State " . $cfg->{zip};
} elsif (defined $cfg->{geonameid}) {
my $sql = qq{
Expand Down

0 comments on commit 832e6ea

Please sign in to comment.