fixed bug: when system timezone is equal to your timezone, dont show the different timezones warning

This commit is contained in:
alejandro-campos 2018-07-30 16:25:38 +02:00
parent fb73a0b8b2
commit 443b70c39d
1 changed files with 11 additions and 7 deletions

View File

@ -3933,13 +3933,17 @@ function ui_get_using_system_timezone_warning ($tag = "h3", $return = true) {
$user_offset = (-get_fixed_offset() / 60) / 60;
$message = sprintf(
__("These controls are using the timezone of the system (%s) instead of yours (%s). The difference with your time zone in hours is %s."),
$config["timezone"],
date_default_timezone_get(),
$user_offset > 0 ? "+" . $user_offset : $user_offset
);
return ui_print_info_message($message, '', $return, $tag);
if ($config["timezone"] != date_default_timezone_get()) {
$message = sprintf(
__("These controls are using the timezone of the system (%s) instead of yours (%s). The difference with your time zone in hours is %s."),
$config["timezone"],
date_default_timezone_get(),
$user_offset > 0 ? "+" . $user_offset : $user_offset
);
return ui_print_info_message($message, '', $return, $tag);
} else
return '';
}
/**