Skip to content

Commit

Permalink
Fix #34: Sometimes Alaska never exits Civil Twilight
Browse files Browse the repository at this point in the history
  • Loading branch information
kdknigga committed Nov 7, 2023
1 parent db1bbbd commit b73a5a5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions loggingnight.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,14 @@ def lookup(self):
(i["phen"], i["time"])
for i in self.usno["response"]["properties"]["data"]["sundata"]
)
sun_rise = dateparser.parse(phenTimes["Rise"])
sun_set = dateparser.parse(phenTimes["Set"])
start_civil_twilight = dateparser.parse(phenTimes["Begin Civil Twilight"])
end_civil_twilight = dateparser.parse(phenTimes["End Civil Twilight"])
sun_rise = dateparser.parse(phenTimes.get("Rise", "00:00"))
sun_set = dateparser.parse(phenTimes.get("Set", "23:59"))
start_civil_twilight = dateparser.parse(
phenTimes.get("Begin Civil Twilight", "00:00")
)
end_civil_twilight = dateparser.parse(
phenTimes.get("End Civil Twilight", "23:59")
)

return {
"sun_rise": sun_rise,
Expand Down

0 comments on commit b73a5a5

Please sign in to comment.