From c99e7430df5ff44479404a9295da348ad9432d54 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 12 Feb 2009 17:19:14 -0800 Subject: [PATCH] Fix #1835 (Bug with name on subscription books) --- src/calibre/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/__init__.py b/src/calibre/__init__.py index 3c61de4bec..76ae742de9 100644 --- a/src/calibre/__init__.py +++ b/src/calibre/__init__.py @@ -382,8 +382,10 @@ def walk(dir): for f in record[-1]: yield os.path.join(record[0], f) -def strftime(fmt, t=time.localtime()): +def strftime(fmt, t=None): ''' A version of strtime that returns unicode strings. ''' + if t is None: + t = time.localtime() if iswindows: if isinstance(fmt, unicode): fmt = fmt.encode('mbcs')