I am adding timestamp in my payload and storing it in the database for every record.
Suppose say a part of my payload is {"content":[{"timestamp":"2017-12-12 08:05:30"}]
This is how I process it.
content['timestamp'] = parser.parse(content['timestamp'],dayfirst=True)
My model has timestamp field as :
timestamp = models.DateTimeField(null=True)
When I check in my database it stores timestamp field as :
2017-12-12 13:35:30
Which should be stored as it is as per my requirement. 2017-12-12 08:05:30
i.e it stores the timestamp field + my local timezone(+5:30) hours.
I want it to store the timestamp field as it is.
I tried other posts where they suggest using del os.environ['TZ']
.
Any idea what I may have done which causes this or what could I do to avoid this.
Any help is appreciated.