equal
deleted
inserted
replaced
866 return (string[-4:].isdigit() and |
866 return (string[-4:].isdigit() and |
867 (string[-5] == '+' or string[-5] == '-') and |
867 (string[-5] == '+' or string[-5] == '-') and |
868 string[-6].isspace()) |
868 string[-6].isspace()) |
869 |
869 |
870 if hastimezone(string): |
870 if hastimezone(string): |
871 date, tz = string.rsplit(None, 1) |
871 date, tz = string[:-6], string[-5:] |
872 tz = int(tz) |
872 tz = int(tz) |
873 offset = - 3600 * (tz / 100) - 60 * (tz % 100) |
873 offset = - 3600 * (tz / 100) - 60 * (tz % 100) |
874 else: |
874 else: |
875 date, offset = string, 0 |
875 date, offset = string, 0 |
876 when = int(time.mktime(time.strptime(date, format))) + offset |
876 when = int(time.mktime(time.strptime(date, format))) + offset |