mercurial/util.py
changeset 36551 98d4c642d7f2
parent 36539 0c2eeaca0577
child 36584 f5427483eebe
equal deleted inserted replaced
36550:7f6be7121b28 36551:98d4c642d7f2
  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