function _scheduler_get_user_timezone in Scheduler 5
Same name and namespace in other branches
- 6 scheduler.module \_scheduler_get_user_timezone()
Gets the users timezone if configurable timezones are enabled or otherwise the default timezone of the site
Return value
the offset of the users timezone in seconds
1 call to _scheduler_get_user_timezone()
- _scheduler_strtotime in ./
scheduler.module - Converts an english time string ('Y-m-d H:i:s') from the users timezone into an unix timestamp
File
- ./
scheduler.module, line 301
Code
function _scheduler_get_user_timezone() {
global $user;
$timezone = variable_get('date_default_timezone', 0);
if (variable_get('configurable_timezones', 1) == 1 && strlen($user->timezone)) {
$timezone = $user->timezone;
}
return $timezone;
}