mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
ee43ccb71e
commit
cc1c5bb6fd
@ -378,10 +378,11 @@ def strftime(fmt, t=None):
|
|||||||
t = time.localtime()
|
t = time.localtime()
|
||||||
early_year = t[0] < 1900
|
early_year = t[0] < 1900
|
||||||
if early_year:
|
if early_year:
|
||||||
|
replacement = 1900 if t[0]%4 == 0 else 1901
|
||||||
fmt = fmt.replace('%Y', '_early year hack##')
|
fmt = fmt.replace('%Y', '_early year hack##')
|
||||||
t = list(t)
|
t = list(t)
|
||||||
orig_year = t[0]
|
orig_year = t[0]
|
||||||
t[0] = 1900
|
t[0] = replacement
|
||||||
ans = None
|
ans = None
|
||||||
if iswindows:
|
if iswindows:
|
||||||
if isinstance(fmt, unicode):
|
if isinstance(fmt, unicode):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user