Atom Feed dates should use settings.TIME_ZONE
|Reported by:||mattdw||Owned by:|
|Severity:||Keywords:||atom timezone dates|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Atom feeds currently only seem to format dates if the dates have attached timezone information. For some reason my dates don't (perhaps because I'm using SQLite as my backend.)
In settings.py I have:
TIME_ZONE = 'Pacific/Auckland'
A comment object has date:
>>> c <Comment: Matt: A test comment…> >>> c.published datetime.datetime(2008, 4, 14, 17, 46, 15, 24810)
the corresponding atom feed entry has date:
There are two possible fixes that I can think of; either the correct offset should be calculated (e.g.
2008-04-14T17:46:15+12:00) or the time should be converted to UTC (e.g.
The rest of my website seems to handle dates and times fine (although I suspect it may be because it's not trying to do any TZ work at all, just displaying the dates as-is), which is why I've categorised it as a Feed Framework issue.
Change History (15)
comment:1 Changed 8 years ago by
|Patch needs improvement:||unset|
|Triage Stage:||Unreviewed → Accepted|
comment:7 Changed 8 years ago by
|Owner:||changed from anonymous to ccahoon <chris.cahoon@…>|
|Status:||assigned → new|