Skip to main content
Logan Pelletier ha preguntado en #Integration
Hello.

Currently trying to help one of our users with importing/updating date fields. They are in GMT+1.

On DATE fields, such as Contact.birthdate, the date will ALWAYS be 1 day behind. I have tested this myself; even when setting local system settings and Salesforce settings to the same timezone, the date will still be inserted one day behind. This field is NOT a datetime, so there is no timezone in the data entry.

How can I help the user alleviate their issue here, without having them malform their data?
3 respuestas
  1. 28 jul, 9:10

    The reason for this is because Salesforce stores the Date in UTC time. I assume, when you load your data, the actual UTC datetime of the date you are loading is 1 day earlier. 

     

    Since your field is just a date field, any date you provide, is the 12 AM representation of the date, because that's the first time the date is born. For example, 2nd January is born 1 minute after 11.59 PM of 1st January.  

     

    Therefore, if your date field is saying 2nd January. Salesforce assume it is 2nd January 12 AM, which when converted to UTC (the format date is saved at the backend), will be 1st January....since, at 2nd January 12 AM GMT+1, UTC is at 1 January 11 PM.

0/9000