I am trying to set time index to pandas DataFrame using pandas.to_datetime function, but the outcome datetime is UTC when converting seconds, and while it is not requested :
import pandas
import datetime,time
datetime1 = '2017-03-30T12-00-00'
d = datetime.datetime.strptime(datetime1, "%Y-%m-%dT%H-%M-%S")
s = time.mktime(d.timetuple())
print pandas.to_datetime(datetime1, format = "%Y-%m-%dT%H-%M-%S")
print pandas.to_datetime(s, unit='s')
Get two different results, although utc option of pandas.to_datetime is not used in both cases.
Any ideas ?