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
Pranav S SanvatsarkarPranav S Sanvatsarkar 

Timezone for Community User is defaullting to GMT disregarding Organization Default Time Zone

Hello there,

I have setup communities for self-registering community users. I have written my own controller to handle registration process. Whenever community users are self registering, they are getting allocated time zone of GMT instead of default organization time zone.

I think, the SF might be assigned default time zone to community users as well as it does with internal users. Am I right?

Thanks in advance.
Brian Cherry 11Brian Cherry 11
You can set the timezone in your apex controller by setting the field of  TimeZoneSidKey. You can give them the option to select the time zone by doing a schema pull: 

Schema.DescribeFieldResult fieldResult = User.TimeZoneSidKey.getdescribe();
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
for(Schema.PicklistEntry p : ple)
{
system.debug('###'+p.getlabel()+'****'+p.getValue()+'\n');

}