Index: trunk/extensions/ParserFunctions/ParserFunctions_body.php |
— | — | @@ -481,14 +481,14 @@ |
482 | 482 | if ( $local ) { |
483 | 483 | # Use the time zone |
484 | 484 | if ( isset( $wgLocaltimezone ) ) { |
485 | | - $oldtz = getenv( 'TZ' ); |
486 | | - putenv( 'TZ=' . $wgLocaltimezone ); |
| 485 | + $oldtz = date_default_timezone_get(); |
| 486 | + date_default_timezone_set( $wgLocaltimezone ); |
487 | 487 | } |
488 | 488 | wfSuppressWarnings(); // E_STRICT system time bitching |
489 | 489 | $ts = date( 'YmdHis', $unix ); |
490 | 490 | wfRestoreWarnings(); |
491 | 491 | if ( isset( $wgLocaltimezone ) ) { |
492 | | - putenv( 'TZ=' . $oldtz ); |
| 492 | + date_default_timezone_set( $oldtz ); |
493 | 493 | } |
494 | 494 | } else { |
495 | 495 | $ts = wfTimestamp( TS_MW, $unix ); |