Skip to content

Commit

Permalink
Change retrieval of timezone parameter per comment in pull request
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanSlavinBryter committed Dec 25, 2024
1 parent 53b9e96 commit 0765b9d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions apps/hanukkah/hanukkah.star
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ def get_hanukkah_dates(year):
return hanukkah_first_day, hanukkah_last_day

def main(config):
timezone = config.get("timezone") or "America/New_York"
if not time.is_valid_timezone(timezone):
timezone = "America/New_York"
current_time = time.now().in_location(timezone)
tz = config.get("$tz", "America/New_York")
current_time = time.now().in_location(tz)
current_year = current_time.year

if current_year > 2030:
Expand Down

0 comments on commit 0765b9d

Please sign in to comment.