1

i have a custom object i stored startdatetime__c and enddatetime__c field.during storing i stored 4/28/2014 8:00 AM as startdatetime__c and enddatetime__c at 4/28/2014 4:00 PM but when i try to retrieve from developer console it shows startdatetime__c field as 2014-04-28T15:00:00.000+0000 and enddatetime__c field as 2014-04-28T23:00:00.000+0000 .it is in IST .my time zone is India standard time.but it is at GMT +05:30 but the difference of hours is 9 hours.it means salesforce stores date time value at GMT -03:30 not at GMT +0.Please confirm if my assumption is correct.Thanks :)

1

It's my current understanding that all date/times are stored by the persistence layer as GMT times. When the UI presents the Date/Time it uses the i18n and LANG settings of the ORG object to convert those GMT times into the Orgs' timezone.

The confusion always seems to arise, in my experience, from the assumption that the timezone settings would be pulled from the USER object and thus relative to the User viewing the data rather than the Org object.

Additionally, it's unclear to me whether or not the Dev console follows that rule, (or any rule at all) when displaying dates/times.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.