mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
GMT Time in ATOM feeds
This commit is contained in:
parent
4a6bf81b2e
commit
acb65b77af
2 changed files with 11 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ from functools import partial
|
|||
import locale
|
||||
|
||||
from feedgenerator import Atom1Feed, Rss201rev2Feed
|
||||
from pelican.utils import get_relative_path
|
||||
from pelican.utils import get_relative_path, local_to_utc
|
||||
from pelican.paginator import Paginator
|
||||
from pelican.log import *
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ class Writer(object):
|
|||
description=item.content,
|
||||
categories=item.tags if hasattr(item, 'tags') else None,
|
||||
author_name=getattr(item, 'author', 'John Doe'),
|
||||
pubdate=item.date)
|
||||
pubdate=local_to_utc(item.date.timetuple()))
|
||||
|
||||
def write_feed(self, elements, context, filename=None, feed_type='atom'):
|
||||
"""Generate a feed with the list of articles provided
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue