mercurial/util.py
changeset 32290 2959c3e986e0
parent 32208 d74b0cff94a9
child 32291 bd872f64a8ba
equal deleted inserted replaced
32289:770bbfdc9644 32290:2959c3e986e0
  1935         else:
  1935         else:
  1936             # We've found a specific time element, less specific time
  1936             # We've found a specific time element, less specific time
  1937             # elements are relative to today
  1937             # elements are relative to today
  1938             usenow = True
  1938             usenow = True
  1939 
  1939 
  1940     timetuple = time.strptime(date, format)
  1940     timetuple = time.strptime(encoding.strfromlocal(date),
       
  1941                               encoding.strfromlocal(format))
  1941     localunixtime = int(calendar.timegm(timetuple))
  1942     localunixtime = int(calendar.timegm(timetuple))
  1942     if offset is None:
  1943     if offset is None:
  1943         # local timezone
  1944         # local timezone
  1944         unixtime = int(time.mktime(timetuple))
  1945         unixtime = int(time.mktime(timetuple))
  1945         offset = unixtime - localunixtime
  1946         offset = unixtime - localunixtime