Implements hook_user_presave().
function system_user_presave($account) {
$config = config('system.date');
if ($config
->get('timezone.user.configurable') && empty($account->timezone) && !$config
->get('timezone.user.default')) {
$account->timezone = $config
->get('timezone.default');
}
}