You need to sign in to do that
Don't have an account?
Ken Koellner 1
Get longer timezone description
Under personnal preference, you see timezone Names like --
Line Is. Time (Pacific/Kiritimati)
Phoenix Is.Time (Pacific/Enderbury)
Tonga Time (Pacific/Tongatapu)
...
Eastern Daylight Time (America/Indiana/Indianapolis)
Eastern Daylight Time (America/New_York)
But User.TimeZoneSidKey has only the ISO timezone name like "America/New_York".
Is there any place in SF where Apex code can get the fullname like like "Eastern Daylight Time (America/New_York)"?
Line Is. Time (Pacific/Kiritimati)
Phoenix Is.Time (Pacific/Enderbury)
Tonga Time (Pacific/Tongatapu)
...
Eastern Daylight Time (America/Indiana/Indianapolis)
Eastern Daylight Time (America/New_York)
But User.TimeZoneSidKey has only the ISO timezone name like "America/New_York".
Is there any place in SF where Apex code can get the fullname like like "Eastern Daylight Time (America/New_York)"?
Try running the following code (in developer console) and see if it helps:
I'm in America/New_York and when I run that today, it get --
Note that I am currently in Easten Daylight Time. SF doesn't switch the description when in DST.
I recognize that this issue is a pain. The only foolproof way to deal with timezones is to use the ISO timezone strings like "America/New_York" but non-technos hate that. Of course non-technos often type EST when they mean EDT and make other inconsitencies but our job it to always make it work the way they like it.