equal
deleted
inserted
replaced
2351 return datestr(date, format='%Y-%m-%d') |
2351 return datestr(date, format='%Y-%m-%d') |
2352 |
2352 |
2353 def parsetimezone(s): |
2353 def parsetimezone(s): |
2354 """find a trailing timezone, if any, in string, and return a |
2354 """find a trailing timezone, if any, in string, and return a |
2355 (offset, remainder) pair""" |
2355 (offset, remainder) pair""" |
|
2356 s = pycompat.bytestr(s) |
2356 |
2357 |
2357 if s.endswith("GMT") or s.endswith("UTC"): |
2358 if s.endswith("GMT") or s.endswith("UTC"): |
2358 return 0, s[:-3].rstrip() |
2359 return 0, s[:-3].rstrip() |
2359 |
2360 |
2360 # Unix-style timezones [+-]hhmm |
2361 # Unix-style timezones [+-]hhmm |