Open mdlama opened 3 months ago
Actually not sure what this is supposed to do.
I should also add that the user's timezone is not working. It seems to be always showing EDT.
See https://qubeshub.org/support/ticket/1673 (should have worked to pull from user timezone, but not working right now)
Found it. Previous dev created a userLocalizer helper file that was supposed to get user timezone but wasn't working: core/plugins/groups/calendar/helpers/userLocalizer.php
.
The code was using User::get('params')
, but for some reason that is ignoring the jos_user database. The following code works in the userLocalizer.php
file:
protected function _getUserTimezone()
{
$member = Member::oneOrFail(User::get('id'));
return $member->params->get('timezone') ? $member->params->get('timezone') : $this->systemTimezone;
}
For Member
to work, need to have use Components\Members\Models\Member;
...in particular when the setting "Ignore daylight savings time" is selected. You can see it in action here:
https://qubeshub.org/community/groups/ocelots/events/past
Search the page for "Workshop: Turn your research in tropical biology into engaging online learning modules with OCELOTS"