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
Amit Kr SinghAmit Kr Singh 

How to Convert All user profile time zone to GMT time zone

Hi All,

In my current scenario, I am having  50 users in my organization, 10 are in the US, 20 are in the UK, 20 are in India. every user is using his own time zone. 
if I am creating one record using Object Name "test_object__c " then I want one field that stores GMT time zone for all user, if the user is in the US or, the UK, or in India.

if "target_date___c" date field stores according to all users time zone but I want to convert all time zone that store in target date field should convert into GMT and stores into  "ConvertedDateField_with_GMT__c" field.


Please help me.

Thanks in advance.
 
 
Rohit B ☁Rohit B ☁
Hi Amit,
You can export your result using DataLoder and update this exported file with your GMT values by adding/subtracting hours depending on the timezones. Then upload it back to salesforce using DataLoader.

Hope it works for you.. :)
Amit Kr SinghAmit Kr Singh
@Rohit,
I don't want to do by using data loader.
my requirement is I want to fetch user profile time zone in Object A in one custom field and then that field value need to convert in GMT and store into the second Custom field.

Please tell me how to convert all time zone into GMT format.

 
Rohit B ☁Rohit B ☁
I don't think there is any direct way to convert time zone value like this.
Amit Kr SinghAmit Kr Singh
@Rohit,
Can it done by Trigger?