Answer by jfs for Have a correct datetime with correct timezone
feedparser returns time in UTC timezone. It is incorrect to apply time.mktime() to it (unless your local timezone is UTC that it isn't). You should use calendar.timegm() instead:import calendarfrom...
View ArticleAnswer by oxymor0n for Have a correct datetime with correct timezone
feedparser does provide the original datetime string (just remove the _parsed suffix from the attribute name), so if you know the format of the string, you can parse it into a tz-aware datetime object...
View ArticleAnswer by Tuan Anh Hoang-Vu for Have a correct datetime with correct timezone
Try this:>>> import os>>> os.environ['TZ'] = 'Europe/Paris'>>> time.tzset()>>> time.tzname('CET', 'CEST')
View ArticleHave a correct datetime with correct timezone
I am using feedparser in order to get RSS data.Here is my code :>>> import datetime>>> import time>>> import feedparser>>>...
View Article