0

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?

  • 1
    Please share the code you are using to get these numbers. – Adrian Larson Aug 29 '17 at 14:58
4

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

  • Awesome - I'll go ahead with this. And it makes sense - it's consistent with other areas of the system. But still odd that it's not documented in the Business Hours area. – chris markiewicz Aug 30 '17 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.