UTC time conversion error
-
I recently installed WP Photo Album Plus on my website and am getting this error:
Notice: date_default_timezone_set(): Timezone ID ‘UTC-7’ is invalid in /home4/westesk5/public_html/wordpress/wp-content/plugins/wp-photo-album-plus/wppa-date-time.php on line 195
I’m not enough of a programmer to figure out how to correct it.
Line 195 and the surrounding language is:
// Find timezonestring
$tzstring = get_option( ‘timezone_string’ );
if ( empty( $tzstring ) ) {// Create a UTC+- zone if no timezone string exists
$current_offset = get_option( ‘gmt_offset’, 0 );
if ( 0 == $current_offset ) {
$tzstring = ‘UTC’;
}
elseif ($current_offset < 0 ) {
$tzstring = ‘UTC’ . $current_offset;
}
else {
$tzstring = ‘UTC+’ . $current_offset;
}
}// Get the right output
date_default_timezone_set( $tzstring );
$result = date_i18n( $format, $time );// Reset default timezone to wp standard
date_default_timezone_set( ‘GMT’ );
return $result;
}westerntrailrider.com running the theme “2014”. Debug button is enabled. My timezone is actually UTC-7.
Hope you can help. Doesn’t affect the function, but the error message shows up on the widget display and looks bad on the page.
- The topic ‘UTC time conversion error’ is closed to new replies.