equal
deleted
inserted
replaced
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 |