X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/5f176bb52a7a59bf88f5728e60a3a62e12fb3d54..3306216e9d0c249c2699275aad212a7c4c3cc4a7:/wolnelektury/utils.py?ds=inline diff --git a/wolnelektury/utils.py b/wolnelektury/utils.py index ad5722201..0c256e5df 100644 --- a/wolnelektury/utils.py +++ b/wolnelektury/utils.py @@ -1,10 +1,16 @@ +# -*- coding: utf-8 -*- +# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. +# import pytz from django.utils import timezone from django.conf import settings +tz = pytz.timezone(settings.TIME_ZONE) + def localtime_to_utc(localtime): return timezone.utc.normalize( - pytz.timezone(settings.TIME_ZONE).localize(localtime) + tz.localize(localtime) ) def utc_for_js(dt):