+ Start a Discussion
Dev@Force.ax647Dev@Force.ax647 

convert 6pm of any time zone into PST

I want to get 6pm of any time zone. and then convert into PST.

For example 6pm on EST will become 3PMPST. 6PM Germany time will become 9am PST.

Also I want to take care of day light saving.

 

Thanks in advance

hisalesforcehisalesforce

DateTime.now().format('MM/dd/yyyy HH:mm:ss',
'America/Los_Angeles');

 

 

This format will convert any timezone to Pacific time.You can write a logic to check specific time and if condition match you can use this format to Convert time to PST.It will take care of the day light saving...