[SalesForce] Business Hours and Time Zones (EDT vs EST?)

I have trigger code that is calculating the span between two Date/Time fields – respecting Business Hours – easy. Business Hours end daily at 5pm – and the Time Zone is set to EST (however we're currently in EDT). If the start time is 4pm and the end time is 6pm, I should get 1 hour, because Business Hours end at 5pm. However I'm getting 2 hours – and I assume this is because Business Hours is using EST.

So my question is…The rest of the system adjusts for Daylight Savings Time…do Business Hours not make the adjustment? (I notice that in Business Hours, you can choose EST or EDT…whereas on a User record for example, you can only choose the one that is currently valid – so right now, no EST is available because it's August…)

Any thoughts on this? Do we have to adjust the Time Zone on Business Hours every spring and autumn?

Best Answer

Set your timezone to GMT -4:00 Eastern Daylight Time (America/New York). It will auto adjust for you as needed when set to that.

If you set it to Standard Time as you have it will not adjust for DST

Related Topic