diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
index f0404830bd..b4d7885f23 100644
a
|
b
|
function wp_default_packages_inline_scripts( $scripts ) { |
322 | 322 | ) |
323 | 323 | ); |
324 | 324 | |
| 325 | // Calculate the timezone abbr (EDT, PST) if possible. |
| 326 | $timezone_string = get_option( 'timezone_string', 'UTC' ); |
| 327 | $timezone_abbr = ''; |
| 328 | |
| 329 | if ( ! empty( $timezone_string ) ) { |
| 330 | $timezone_date = new DateTime( null, new DateTimeZone( $timezone_string ) ); |
| 331 | $timezone_abbr = $timezone_date->format( 'T' ); |
| 332 | } |
| 333 | |
325 | 334 | $scripts->add_inline_script( |
326 | 335 | 'wp-date', |
327 | 336 | sprintf( |
… |
… |
function wp_default_packages_inline_scripts( $scripts ) { |
354 | 363 | ), |
355 | 364 | 'timezone' => array( |
356 | 365 | 'offset' => get_option( 'gmt_offset', 0 ), |
357 | | 'string' => get_option( 'timezone_string', 'UTC' ), |
| 366 | 'string' => $timezone_string, |
| 367 | 'abbr' => $timezone_abbr, |
358 | 368 | ), |
359 | 369 | ) |
360 | 370 | ) |