1

The below seemed to work well except with regards to Daylight Savings Time. I'm hopeful, depending on how your UserTimezoneOffset field is set, that this might not be an issue. For reference, this thread contains where I got the initial structure of the formula from and good discussion about doing what you're looking for. You'll be parsing through the ...


1

Timezones are the bane of my existence, so I usually try to rationalize what is happening. Here is my result. When you add your offset, apex will return a datetime record that will be identical to the time you have right now locally. However, as far as apex is concerned, that datetime will still be in GMT. Hence, when you do hourGMT, you will get the ...


Only top voted, non community-wiki answers of a minimum length are eligible