Skip to content

Commit

Permalink
Fix datetime input in airmass example app (#1194)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie authored Mar 6, 2024
1 parent a563f38 commit 999ef40
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/airmass/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ def times_utc() -> Tuple[datetime.datetime, datetime.datetime]:
req(input.date())
lat, long = loc()
sun = suntime.Sun(lat, long)
day = datetime.datetime.combine(input.date(), datetime.time())
return (
sun.get_sunset_time(input.date()),
sun.get_sunrise_time(input.date() + datetime.timedelta(days=1)),
sun.get_sunset_time(day),
sun.get_sunrise_time(day + datetime.timedelta(days=1)),
)

@reactive.calc
Expand Down

0 comments on commit 999ef40

Please sign in to comment.