equal
deleted
inserted
replaced
935 number of seconds away from UTC. if timezone is false, do not |
935 number of seconds away from UTC. if timezone is false, do not |
936 append time zone to string.""" |
936 append time zone to string.""" |
937 t, tz = date or makedate() |
937 t, tz = date or makedate() |
938 if "%1" in format or "%2" in format: |
938 if "%1" in format or "%2" in format: |
939 sign = (tz > 0) and "-" or "+" |
939 sign = (tz > 0) and "-" or "+" |
940 minutes = abs(tz) / 60 |
940 minutes = abs(tz) // 60 |
941 format = format.replace("%1", "%c%02d" % (sign, minutes / 60)) |
941 format = format.replace("%1", "%c%02d" % (sign, minutes // 60)) |
942 format = format.replace("%2", "%02d" % (minutes % 60)) |
942 format = format.replace("%2", "%02d" % (minutes % 60)) |
943 s = time.strftime(format, time.gmtime(float(t) - tz)) |
943 s = time.strftime(format, time.gmtime(float(t) - tz)) |
944 return s |
944 return s |
945 |
945 |
946 def shortdate(date=None): |
946 def shortdate(date=None): |