gnu-social/extlib/Date/tests/bugs/bug-9801.phpt
Diogo Cordeiro a38f25f7cd [PEAR] Modernize Validate code
Upgraded IDNA to IDNA2
Added PEAR Date
> fixed: The each function is deprecated
2019-08-03 17:31:43 +01:00

28 lines
544 B
PHP

--TEST--
Bug #9801: Date::compare() modify params on PHP5
--FILE--
<?php
/**
* Test for: Date class
* Parts tested: Date::compare()
*/
require_once 'Date.php';
// $GLOBALS['_DATE_TIMEZONE_DEFAULT'] = 'Canada/Eastern';
$d1 = new Date();
$d2 = new Date();
$d1->setTZbyID('Canada/Eastern');
$d2->setTZbyID('Canada/Eastern');
echo 'Timezone (before): ' . $d1->tz->getId() . "\n";
Date::compare($d1, $d2);
echo 'Timezone (after): ' . $d1->tz->getId() . "\n";
?>
--EXPECT--
Timezone (before): Canada/Eastern
Timezone (after): Canada/Eastern