The company default time zone is GMT (+00:00), and a date sent using the API is coming through like this:
09:16:37.032 (32355740)|USER_DEBUG||DEBUG|Date/Time: 2014-06-19T10:16:00.977
It arrives as a string in an HTTP GET request, the following apex code runs to convert it to the only datetime format it seems to accept:
relatedRecord.Receipt_Received_At__c = Datetime.valueOf(g_datetime.substring(0, 19).replace('T', ' ')); update relatedRecord;
But then when I go to view it in the saved record detail page, it is showing 11:16, not 10:16. I've tried changing valueOf() to valueOfGmt() but it doesn't change it. Why is the date saving as GMT+01:00?