mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix news downloading breaking on windows systems with local encoding other than UTF-8. Fixes #5699 (Problem with Clarin recipe)
This commit is contained in:
parent
59d2b5fb68
commit
b935eb5e46
@ -11,7 +11,7 @@ from lxml import html
|
|||||||
|
|
||||||
from calibre.web.feeds.feedparser import parse
|
from calibre.web.feeds.feedparser import parse
|
||||||
from calibre.utils.logging import default_log
|
from calibre.utils.logging import default_log
|
||||||
from calibre import entity_to_unicode
|
from calibre import entity_to_unicode, strftime
|
||||||
from calibre.utils.date import dt_factory, utcnow, local_tz
|
from calibre.utils.date import dt_factory, utcnow, local_tz
|
||||||
|
|
||||||
class Article(object):
|
class Article(object):
|
||||||
@ -55,7 +55,8 @@ class Article(object):
|
|||||||
def formatted_date(self):
|
def formatted_date(self):
|
||||||
def fget(self):
|
def fget(self):
|
||||||
if self._formatted_date is None:
|
if self._formatted_date is None:
|
||||||
self._formatted_date = self.localtime.strftime(" [%a, %d %b %H:%M]")
|
self._formatted_date = strftime(" [%a, %d %b %H:%M]",
|
||||||
|
t=self.localtime.timetuple())
|
||||||
return self._formatted_date
|
return self._formatted_date
|
||||||
def fset(self, val):
|
def fset(self, val):
|
||||||
self._formatted_date = val
|
self._formatted_date = val
|
||||||
|
Loading…
x
Reference in New Issue
Block a user