Show More
@@ -1023,6 +1023,9 b" def datestr(date=None, format='%a %b %d " | |||||
1023 | number of seconds away from UTC. if timezone is false, do not |
|
1023 | number of seconds away from UTC. if timezone is false, do not | |
1024 | append time zone to string.""" |
|
1024 | append time zone to string.""" | |
1025 | t, tz = date or makedate() |
|
1025 | t, tz = date or makedate() | |
|
1026 | if t < 0: | |||
|
1027 | t = 0 # time.gmtime(lt) fails on Windows for lt < -43200 | |||
|
1028 | tz = 0 | |||
1026 | if "%1" in format or "%2" in format: |
|
1029 | if "%1" in format or "%2" in format: | |
1027 | sign = (tz > 0) and "-" or "+" |
|
1030 | sign = (tz > 0) and "-" or "+" | |
1028 | minutes = abs(tz) // 60 |
|
1031 | minutes = abs(tz) // 60 |
General Comments 0
You need to be logged in to leave comments.
Login now