We have incoming JSON from one of our client using REST API.
The JSON they send has a timestamp value as a String like this
"timestamp": "2017-01-11 19:23:27 CST"
.
CST here being China Standard Time not Central Standard Time zone of US.
I am trying to map that value to a DateTime custom field in a custom sObject and do an insert.
Timestamp is String which I am converting to DateTime by using
Datetime myDate = Datetime.valueOf(timestamp);
Using the above function the myDate value is getting converted to GMT.
Is there any way that I can use to just convert timestamp string value into DateTime value without GMT conversion and insert into custom object as it is?
The timestamp needs to have the value unchanged from JSON because of some reporting requirements.