patch 940936aea4bf440b777cf726b9c88f21fc54f131
Author: E. Bosch <presidev@AT@gmail.com>
Date: Sun May 7 11:49:05 CEST 2023
* service: In dialog list: Use timezone option to convert the date for "last" field
hunk ./service.py 91
- last = compact_date(dialog.date)
+ last = compact_date(dialog.date, self.tg.timezone)
hunk ./utils.py 115
-def compact_date(date):
+def compact_date(date, tz):
hunk ./utils.py 117
+ date_local = date.astimezone(zoneinfo.ZoneInfo(tz))
hunk ./utils.py 120
- compact_date = date.strftime('%H:%M')
+ compact_date = date_local.strftime('%H:%M')
hunk ./utils.py 122
- compact_date = date.strftime('%d-%b')
+ compact_date = date_local.strftime('%d-%b')
hunk ./utils.py 124
- compact_date = date.strftime('%Y')
+ compact_date = date_local.strftime('%Y')