Show More
@@ -34,6 +34,8 b' from __future__ import unicode_literals' | |||
|
34 | 34 | |
|
35 | 35 | import datetime |
|
36 | 36 | from StringIO import StringIO |
|
37 | ||
|
38 | import pytz | |
|
37 | 39 | from six.moves.urllib import parse as urlparse |
|
38 | 40 | |
|
39 | 41 | from rhodecode.lib.feedgenerator import datetime_safe |
@@ -227,13 +229,13 b' class SyndicationFeed(object):' | |||
|
227 | 229 | latest_date = item_date |
|
228 | 230 | |
|
229 | 231 | # datetime.now(tz=utc) is slower, as documented in django.utils.timezone.now |
|
230 | return latest_date or datetime.datetime.utcnow().replace(tzinfo=utc) | |
|
232 | return latest_date or datetime.datetime.utcnow().replace(tzinfo=pytz.utc) | |
|
231 | 233 | |
|
232 | 234 | |
|
233 | 235 | class Enclosure(object): |
|
234 | "Represents an RSS enclosure" | |
|
236 | """Represents an RSS enclosure""" | |
|
235 | 237 | def __init__(self, url, length, mime_type): |
|
236 | "All args are expected to be Python Unicode objects" | |
|
238 | """All args are expected to be Python Unicode objects""" | |
|
237 | 239 | self.length, self.mime_type = length, mime_type |
|
238 | 240 | self.url = iri_to_uri(url) |
|
239 | 241 |
General Comments 0
You need to be logged in to leave comments.
Login now