ya3

ya3 -- yet another appointment application
Log | Files | Refs

commit 9148a0399680f9ef4f5521fe8786dac1eb2428cf
parent 4fa157d798f7bbc1ede6217e1ac5e4a55946510f
Author: Matthias Balk <mbalk@mbalk.de>
Date:   Tue,  9 Feb 2021 18:50:33 +0100

Bugfix: set correct tzinfo object

Diffstat:
Msrc/commands.py | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/commands.py b/src/commands.py @@ -22,6 +22,7 @@ import uuid from collections import OrderedDict from datetime import datetime +import dateutil.tz as tz from dateutil.parser import parse import config @@ -30,7 +31,7 @@ from utils import event2string, get_events def _localtime2utc(datetimestr): local = parse('%s %s' % (datetimestr, time.tzname[0])) - return local - local.utcoffset() + return (local - local.utcoffset()).replace(tzinfo=tz.UTC) def _get_input(key):