Show More
@@ -891,7 +891,12 b" def datestr(date=None, format='%a %b %d " | |||
|
891 | 891 | minutes = abs(tz) // 60 |
|
892 | 892 | format = format.replace("%1", "%c%02d" % (sign, minutes // 60)) |
|
893 | 893 | format = format.replace("%2", "%02d" % (minutes % 60)) |
|
894 | s = time.strftime(format, time.gmtime(float(t) - tz)) | |
|
894 | try: | |
|
895 | t = time.gmtime(float(t) - tz) | |
|
896 | except ValueError: | |
|
897 | # time was out of range | |
|
898 | t = time.gmtime(sys.maxint) | |
|
899 | s = time.strftime(format, t) | |
|
895 | 900 | return s |
|
896 | 901 | |
|
897 | 902 | def shortdate(date=None): |
General Comments 0
You need to be logged in to leave comments.
Login now