function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Cris9931Cris9931 

Date/Time field - Time Conversion Problem

Hi, we have 1 field which is Date/Time. The problem is that this field will get converted according to the user timezone. We have people working from all over the world and we don't want time conversion. We want if we select 7/6/2020 11:00 AM to be the same for everybody not to be converted on the current user timezone... is there a solution for this? I never worked with UTC timezone...

AnudeepAnudeep (Salesforce Developers) 
Hi Sarah, 

If the time zone remains the same for everyone, the values within date/time fields will remain constant for all Users on the records. 

Here is how the Date/Time fields work in Salesforce

Date/Time fields are stored internally in UTC which aligns with Greenwich Mean Time (GMT)

If your user's time zone is not GMT, but for example GMT+1, an extra hour will be added when viewing the data via the UI in Salesforce.

For example: 

If the Date/Time field in the CSV file is: 
2016-03-01T08:00:00.000Z  (Z stands for UTC time)

Then the Date/Time field in the Salesforce UI will be: 
01/03/2016 09:00

Salesforce just added +1 hour to the time field, because the user's time zone is GMT+1.

When the Daylight Savings Time (DST / "summer time") applies, it adjusts the time based on the viewing users Time Zone settings, + 1 hour in most cases. 

In this case, if the user's time zone GMT+1 (as an example) the following applies:

If the Date/Time field in the CSV file is: 
2016-08-20T08:00:00.000Z  (Z stands for UTC time)

Then the Date/Time field in the Salesforce UI will be:
20/08/2016 10:00

You will see, that Salesforce adds +2 hours:
+1 hour because the user's time zone is GMT+1
+1 hour because of the DST: it adds +1 hour to the winter time.

These examples presented with the GMT+1 time zone, but the rule applies to any time zone, and the +1 hour DST for any location, where DST applies.

Let me know if this helps

Anudeep