I am running this code to get timestamp from string But it giving wrong value for some particular value.
import datetime
import time
print(datetime.datetime.fromtimestamp(time.mktime(time.strptime("20170312025709", "%Y%m%d%H%M%S"))))
It is supposed to return "2017-03-12 02:57:09"## but it giving "2017-03-12 03:57:09"
what could be the reason. I am using python3.