| 348 | |
| 349 | /** |
| 350 | * @group bp_core_time_since |
| 351 | * @group bp_core_current_time |
| 352 | */ |
| 353 | public function test_bp_core_time_since_timezone() { |
| 354 | // backup timezone |
| 355 | $tz_backup = date_default_timezone_get(); |
| 356 | |
| 357 | // set timezone to something other than UTC |
| 358 | date_default_timezone_set( 'Europe/Paris' ); |
| 359 | |
| 360 | $this->assertSame( 'right now', bp_core_time_since( time() ) ); |
| 361 | |
| 362 | // revert timezone back to normal |
| 363 | if ( $tz_backup ) { |
| 364 | date_default_timezone_set( $tz_backup ); |
| 365 | } |
| 366 | } |