Fix #6296 (Unable to see contents of library)

This commit is contained in:
Kovid Goyal 2010-07-25 19:53:27 -06:00
parent 007e06dfa5
commit 3a319d0587

View File

@ -46,7 +46,11 @@ def strptime(src):
return time.strptime(' '.join(src), '%w, %d %m %Y %H:%M:%S %Z')
def strftime(epoch, zone=time.localtime):
src = time.strftime("%w, %d %m %Y %H:%M:%S GMT", zone(epoch)).split()
try:
src = time.strftime("%w, %d %m %Y %H:%M:%S GMT", zone(epoch)).split()
except:
src = time.strftime("%w, %d %m %Y %H:%M:%S GMT", zone()).split()
src[0] = INVERSE_DAY_MAP[int(src[0][:-1])]+','
src[2] = INVERSE_MONTH_MAP[int(src[2])]
return ' '.join(src)