| 123 | | if ( preg_match( "/$timezone_formats_re/", $dateformatstring ) ) { |
| 124 | | $timezone_string = get_option( 'timezone_string' ); |
| 125 | | if ( $timezone_string ) { |
| 126 | | $timezone_object = timezone_open( $timezone_string ); |
| 127 | | $date_object = date_create( null, $timezone_object ); |
| 128 | | foreach( $timezone_formats as $timezone_format ) { |
| 129 | | if ( false !== strpos( $dateformatstring, $timezone_format ) ) { |
| 130 | | $formatted = date_format( $date_object, $timezone_format ); |
| 131 | | $dateformatstring = ' '.$dateformatstring; |
| 132 | | $dateformatstring = preg_replace( "/([^\\\])$timezone_format/", "\\1" . backslashit( $formatted ), $dateformatstring ); |
| 133 | | $dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 ); |
| 134 | | } |
| | 124 | |
| | 125 | $timezone_string = get_option( 'timezone_string' ); |
| | 126 | if ( $timezone_string ) { |
| | 127 | $timezone_object = timezone_open( $timezone_string ); |
| | 128 | } |
| | 129 | |
| | 130 | if ( preg_match( "/$timezone_formats_re/", $dateformatstring ) && $timezone_string ) { |
| | 131 | $date_object = date_create( null, $timezone_object ); |
| | 132 | foreach( $timezone_formats as $timezone_format ) { |
| | 133 | if ( false !== strpos( $dateformatstring, $timezone_format ) ) { |
| | 134 | $formatted = date_format( $date_object, $timezone_format ); |
| | 135 | $dateformatstring = ' '.$dateformatstring; |
| | 136 | $dateformatstring = preg_replace( "/([^\\\])$timezone_format/", "\\1" . backslashit( $formatted ), $dateformatstring ); |
| | 137 | $dateformatstring = substr( $dateformatstring, 1, strlen( $dateformatstring ) -1 ); |