mercurial/util.py
changeset 2546 8cb894370514
parent 2523 4ab59a3acd16
child 2579 0875cda033fd
equal deleted inserted replaced
2545:cff57cb5631e 2546:8cb894370514
   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