1 # -*- coding: utf-8 -*-
2 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
6 from django.utils import timezone
7 from django.conf import settings
8 from pipeline.storage import GZIPMixin
9 from pipeline.storage import PipelineCachedStorage
11 tz = pytz.timezone(settings.TIME_ZONE)
13 def localtime_to_utc(localtime):
14 return timezone.utc.normalize(
15 tz.localize(localtime)
19 return dt.strftime('%Y/%m/%d %H:%M:%S UTC')
21 class GzipPipelineCachedStorage(GZIPMixin, PipelineCachedStorage):