Mercurial > personal > weather-server
changeset 43:1a69004d8e5a v0.2.1
Remove improper, broken use of ZoneInfo.localize.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Tue, 01 Apr 2025 16:29:09 -0400 |
parents | d63ed60a41c7 |
children | 4ef6854446fe |
files | weather_server/server.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/weather_server/server.py Tue Apr 01 16:05:13 2025 -0400 +++ b/weather_server/server.py Tue Apr 01 16:29:09 2025 -0400 @@ -55,7 +55,7 @@ last_reading = loc.latest() if last_reading: tz = loc.timezone() - date = tz.normalize(last_reading.sample_time.astimezone(tz)) + date = last_reading.sample_time.astimezone(tz) else: date = None now = datetime.datetime.now(tz=datetime.UTC)