Tip: Time zone issue when inserting Salesforce data through Data Loader

Lets say you are trying to insert a set of time into Salesforce, given the raw data is in a form such as below:


Sample 1: Example of raw time data

After conversion is done to the time data, they should be in a format as below:



Sample 2: Salesforce time format

Now the data is ready to be inserted, but do not feel panic if you see the result shown in Salesforce record is different from the time shown in the spreadsheet. It might occur to be a day before or a day after. So why is this happening?


The Possible Reasons

  1. Apex DataLoader timezone is not set correctly. (DataLoader time zone is advice to set matching with your locale timezone. Lets say if you are located in Australia, DataLoader should set to Australia timezone)
  2. Salesforce Timezone is set to a different timezone. (For instance, you are expecting to see time data displaying in Australia timzone but Salesforce timezone is set to the UK’s timezone. Therefore, the time displayed in Salesforce does not match with the original time data)

Setting the timezone correctly before inserting time data is very important where it can help reduces error and effort during data migration.