-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
There is a problem to convert times received from get_times() to format "%H:%M:%S %Z" in other time zones than UTC.
I assume that:
sunrise = get_times(date, lat, lon)['sunrise']
saves the sunrise time with local zone instead of UTC.
Maybe the objects returned by get_times should have timezone (UTC) specified?
Please compare:
print(get_times(date, lat, lon)['sunrise'].strftime('%H:%M:%S %Z'))
print(datetime.now().strftime('%H:%M:%S %Z'))
Both gives the answer without timezone info.
How to print the sunrise time, adding timezone info?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels