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
cmarkcmark 

time zone - convert to EDT

Hello.  In a Trigger, I want to take a datetime field and convert it to Eastern Daylight Time (always EDT - no matter what the time zone of the current user is).  I've tried using the format() method and passing the time zone that i want, but it always converts to GMT.  Any ideas?
Thanks
Chris
AttaridAttarid

Hi Chris,

I am having a similar problem, was just wondering if you found a solution and would like to share with me.

Regards

Sam

kevinwukevinwu

Try passing 'GMT-05:00' as the second parameter into format().

 

This won't take into account daylight savings time though.