I have a data frame that looks like this with timestamp in UTC seconds
               open     high      low    close    volumeto
time                                                      
1530169200  6112.81  6120.62  6108.65  6111.63  2212255.01
1530170100  6111.63  6119.12  6106.45  6113.59  1572299.36
1530171000  6113.59  6116.44  6104.34  6110.23  2792660.45
1530171900  6110.23  6123.71  6106.49  6123.71  2314140.04
1530172800  6121.33  6133.24  6121.18  6129.52  2037071.96
When I try to write this to csv, this is what I get, I guess pandas is assuming that the supplied time is local time and offsetting it by 5 hours 30 mins but I have supplied UTC time
1530149400,6112.81,6120.62,6108.65,6111.63,2212255.01:
1530150300,6111.63,6119.12,6106.45,6113.59,1572299.36:
1530151200,6113.59,6116.44,6104.34,6110.23,2792660.45:
1530152100,6110.23,6123.71,6106.49,6123.71,2314140.04:
1530153000,6121.33,6133.24,6121.18,6129.52,2037071.96:
My code looks as shown below
csv_string = io.StringIO()
df.to_csv(csv_string, line_terminator=':', header=False, date_format='%s')
print(csv_string.getvalue())
How do I tell Pandas that I have supplied UTC time and do not wish to offset it while converting?
 
    