Title: UTC time conversion error
Last modified: December 2, 2016

---

# UTC time conversion error

 *  Resolved [tonyhenrie](https://wordpress.org/support/users/tonyhenrie/)
 * (@tonyhenrie)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/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.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [tonyhenrie](https://wordpress.org/support/users/tonyhenrie/)
 * (@tonyhenrie)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/utc-time-conversion-error/#post-8505043)
 * Never mind. It was the time setting in the WordPress settings. The wppa plugin
   does not recognize “UTC-7” from the settings selections, but does recognize “
   Boise” for the time zone.
 * Sorry for the bother.
 *  Plugin Author [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/utc-time-conversion-error/#post-8505245)
 * Using UTC+/-… is an obsolete method and should no longer be used in WP.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘UTC time conversion error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-photo-album-plus.svg)
 * [WP Photo Album Plus](https://wordpress.org/plugins/wp-photo-album-plus/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-photo-album-plus/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-photo-album-plus/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-photo-album-plus/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-photo-album-plus/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-photo-album-plus/reviews/)

## Tags

 * [GMT](https://wordpress.org/support/topic-tag/gmt/)
 * [utc](https://wordpress.org/support/topic-tag/utc/)

 * 2 replies
 * 2 participants
 * Last reply from: [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * Last activity: [9 years, 5 months ago](https://wordpress.org/support/topic/utc-time-conversion-error/#post-8505245)
 * Status: resolved