From cc1c5bb6fdcf202adbb6773cee71c2348b023bfb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 15 Feb 2010 16:54:47 -0700 Subject: [PATCH] ... --- src/calibre/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/__init__.py b/src/calibre/__init__.py index e5e284fb5b..0742e60229 100644 --- a/src/calibre/__init__.py +++ b/src/calibre/__init__.py @@ -378,10 +378,11 @@ def strftime(fmt, t=None): t = time.localtime() early_year = t[0] < 1900 if early_year: + replacement = 1900 if t[0]%4 == 0 else 1901 fmt = fmt.replace('%Y', '_early year hack##') t = list(t) orig_year = t[0] - t[0] = 1900 + t[0] = replacement ans = None if iswindows: if isinstance(fmt, unicode):