diff --git a/functions.php b/functions.php index f2f4d7a..b3ab041 100644 --- a/functions.php +++ b/functions.php @@ -1589,8 +1589,10 @@ function pinc_enqueue_scripts() $user_info = get_userdata($user_ID); if(!empty($user_info->pinc_user_timezone)){ $timeZoneSet = $user_info->pinc_user_timezone; - }else{ + }else if (!empty(get_option('timezone_string'))){ $timeZoneSet = get_option('timezone_string'); + }else { + $timeZoneSet = "Etc/Greenwich"; } $getUserDate = new DateTime(null, new DateTimeZone($timeZoneSet)); $currentTime = $getUserDate->format('H:i:s'); diff --git a/page_cp_settings.php b/page_cp_settings.php index 84764b9..2986708 100644 --- a/page_cp_settings.php +++ b/page_cp_settings.php @@ -356,8 +356,13 @@ function pinc_edit_user( $user_id = 0 ) {
+ pinc_user_timezone); + ?>