/php-src/ext/date/tests/ |
H A D | DateTime_getTimeZone_basic1.phpt | 2 Test DateTime::getTimezone() function : basic functionality 5 echo "*** Testing DateTime::getTimezone() : basic functionality ***\n"; 8 $object = new DateTime("2009-01-30 17:57:32"); 13 $object = new DateTime("2009-01-30 17:57:32"); 22 *** Testing DateTime::getTimezone() : basic functionality ***
|
H A D | bug50055-002.phpt | 2 Bug #50555 (DateTime::sub() allows 'relative' time modifications) (OO). 10 echo $da1->format( DateTime::ISO8601 ), "\n"; 11 echo date_add($da1, $i)->format( DateTime::ISO8601 ), "\n"; 22 echo $da2->format( DateTime::ISO8601 ), "\n"; 23 echo date_add($da2, $i2)->format( DateTime::ISO8601 ), "\n";//works 33 DateInvalidOperationException: DateTime::sub(): Only non-special relative time specifications are s… 36 DateInvalidOperationException: DateTime::sub(): Only non-special relative time specifications are s…
|
H A D | bug53879.phpt | 2 Bug #53879 (DateTime::createFromFormat() fails to parse cookie expiration date) 7 $date = DateTime::createFromFormat(DateTime::COOKIE, "Mon, 21-Jan-2041 15:24:52 GMT"); 11 DateTime Object
|
H A D | bug54851.phpt | 2 Bug #54851 (DateTime::createFromFormat() doesn't interpret "D") 7 $date = new DateTime("2011-05-17T22:14:12"); 8 $date2 = DateTime::createFromFormat("D H i s", $date->format("D"). ' 0 00 00'); 14 $datePre = DateTime::createFromFormat("!D d M Y", "Fri 17 may 2011"); 15 $datePost = DateTime::createFromFormat("!d M Y D", "17 may 2011 Fri"); 22 $date1 = new DateTime("Tuesday"); 23 $date2 = DateTime::createFromFormat("D H i s", "Tuesday 0 00 00"); 29 $date1 = DateTime::createFromFormat("!D d M Y", "Fri 19 November 2011"); 30 $date2 = new DateTime("Fri 19 November 2011"); 36 $date1 = DateTime::createFromFormat("!D d M Y", "Sat 19 November 2011"); [all …]
|
H A D | DateTime_clone_basic1.phpt | 2 Test clone on DateTime objects 9 echo "*** Testing clone on DateTime objects ***\n"; 11 // Create a DateTime object.. 12 $orig = new DateTime('2008-07-02 14:25:41'); 25 *** Testing clone on DateTime objects ***
|
H A D | bug62852.phpt | 2 Bug #62852 (Unserialize invalid DateTime causes crash), variation 1 7 $s1 = 'O:8:"DateTime":3:{s:4:"date";s:20:"10007-06-07 03:51:49";s:13:"timezone_type";i:3;s:8:"timez… 14 Fatal error: Uncaught Error: Invalid serialization data for DateTime object in %sbug62852.php:%d 16 #0 [internal function]: DateTime->__unserialize(Array) 17 #1 %sbug62852.php(%d): unserialize('O:8:"DateTime":...')
|
H A D | bug80483.phpt | 2 Bug #80483 (DateTime Object with 5-digit year can't unserialized) 8 $the_date = new DateTime(); 19 object(DateTime)#%d (%d) { 27 string(116) "O:8:"DateTime":3:{s:4:"date";s:28:"+20201-01-01 00:00:00.000000";s:13:"timezone_type";… 28 object(DateTime)#%d (%d) {
|
H A D | date_period_unserialize3.phpt | 6 $start = new DateTime("2022-07-14 00:00:00", new DateTimeZone("UTC")); 8 $end = new DateTime("2022-07-16 00:00:00", new DateTimeZone("UTC")); 14 "current" => new DateTime, 15 "start" => new DateTime, 16 "end" => new DateTime, 34 object(DateTime)#%d (%d) { 45 object(DateTime)#%d (%d) {
|
H A D | bug66721.phpt | 2 Test for bug #66721: __unserialize of DateTime segfaults when invalid object data is supplied 7 $y = 'O:8:"DateTime":3:{s:4:"date";s:19:"2014-02-15 02:00:51";s:13:"timezone_type";i:3;s:8:"timezon… 11 Fatal error: Uncaught Error: Invalid serialization data for DateTime object in %sbug66721.php:%d 13 #0 [internal function]: DateTime->__unserialize(Array) 14 #1 %sbug66721.php(%d): unserialize('O:8:"DateTime":...')
|
H A D | gh11854.phpt | 2 Bug GH-11854 (DateTime:createFromFormat stopped parsing DateTime with extra space) 7 $dateTime = DateTime::createFromFormat("D M d H:i:s Y", "Wed Aug 2 08:37:50 2023"); 12 object(DateTime)#1 (3) {
|
H A D | bug67308.phpt | 2 Bug #67308 (Serialize of DateTime truncates fractions of second) 8 var_dump(unserialize('O:8:"DateTime":3:{s:4:"date";s:19:"2005-07-14 22:30:41";s:13:"timezone_type";… 11 var_dump(unserialize('O:8:"DateTime":3:{s:4:"date";s:26:"2005-07-14 22:30:41.123456";s:13:"timezone… 14 object(DateTime)#%d (3) { 22 object(DateTime)#%d (3) {
|
H A D | DateTime_construct_error.phpt | 2 Test new DateTime(): error conditions 10 echo "\n-- Testing new DateTime() with more than expected no. of arguments --\n"; 15 var_dump(new DateTime($time, $timezone, $extra_arg)); 24 -- Testing new DateTime() with more than expected no. of arguments -- 25 ArgumentCountError: DateTime::__construct() expects at most 2 arguments, 3 given
|
H A D | bug-gh8471.phpt | 2 Bug GH-8471: Segmentation fault when converting immutable and mutable DateTime instances created us… 5 $reflection = new ReflectionClass('\DateTime'); 15 $reflection = new ReflectionClass('\DateTime'); 29 $mutable = \DateTime::createFromImmutable($immutable); 39 $mutable = \DateTime::createFromInterface($immutable); 47 Object of type DateTime has not been correctly initialized by calling parent::__construct() in its … 48 Object of type DateTime has not been correctly initialized by calling parent::__construct() in its …
|
H A D | bug52063.phpt | 2 Bug #52063 (DateTime constructor's second argument doesn't have a null default value) 6 $a = new DateTime("2009-01-01", null); 7 echo $a->format(DateTime::COOKIE); 10 echo $a->format(DateTime::COOKIE);
|
H A D | date_period_unserialize1.phpt | 6 $start = new DateTime("2022-07-14 00:00:00", new DateTimeZone("UTC")); 8 $end = new DateTime("2022-07-16 00:00:00", new DateTimeZone("UTC")); 13 "start" => new DateTime("2022-07-14 12:00:00", new DateTimeZone("UTC")), 14 "end" => new DateTime("2022-07-16 12:00:00", new DateTimeZone("UTC")), 29 object(DateTime)#%d (%d) { 40 object(DateTime)#%d (%d) {
|
H A D | DateTime_serialize.phpt | 2 Test serialization of DateTime objects 8 $date1 = new DateTime("2005-07-14 22:30:41"); 20 object(DateTime)#%d (3) { 28 string(125) "O:8:"DateTime":3:{s:4:"date";s:26:"2005-07-14 22:30:41.000000";s:13:"timezone_type";i:… 29 object(DateTime)#%d (3) {
|
H A D | bug80047.phpt | 7 class CustomDateTime extends DateTime {} 10 $dt = new DateTime('2022-06-24'); 33 DateTime 34 DateTime 35 DateTime
|
H A D | oo_002.phpt | 6 class _d extends DateTime {} 9 var_dump($d->format(DateTime::RFC822)); 11 var_dump($c->format(DateTime::RFC822)); 14 var_dump($d->format(DateTime::RFC822)); 15 var_dump($c->format(DateTime::RFC822));
|
H A D | DateTime_setDate_basic1.phpt | 2 Test DateTime::setDate() function : basic functionality 8 echo "*** Testing DateTime::setDate() : basic functionality ***\n"; 10 $datetime = new DateTime("2009-01-30 19:34:10"); 20 *** Testing DateTime::setDate() : basic functionality ***
|
H A D | bug68503.phpt | 6 echo date_diff(new DateTime("2015-02-01"), new DateTime("2015-05-01"))->format( '%yY %mM %dD' ), "\… 8 echo date_diff(new DateTime("2015-02-01"), new DateTime("2015-05-01"))->format( '%yY %mM %dD' ), "\…
|
H A D | rfc-datetime_and_daylight_saving_time-type3-ba.phpt | 16 $start = new DateTime('2010-11-07 01:59:59'); 22 $start = new DateTime('2010-11-06 04:30:00'); 28 $start = new DateTime('2010-11-06 04:30:00'); 34 $start = new DateTime('2010-11-06 04:30:00'); 40 $start = new DateTime('2010-11-06 04:30:00'); 46 $start = new DateTime('2010-11-06 04:30:00'); 52 $start = new DateTime('2010-11-06 01:30:00'); 58 $start = new DateTime('2010-11-06 01:30:00'); 64 $start = new DateTime('2010-11-06 04:30:00'); 70 $start = new DateTime('2010-11-06 03:30:00'); [all …]
|
H A D | bug45866.phpt | 2 Bug #45866 (decimal values fed to DateTime->modify() causes long execution times) 7 $date = new DateTime( '2009-07-29 16:44:23 Europe/London' ); 11 $date = new DateTime( '2009-07-29 16:44:23 Europe/London' ); 15 $date = new DateTime( '2009-07-29 16:44:23 Europe/London' ); 26 DateMalformedStringException: DateTime::modify(): Failed to parse time string (£61538461538 day) at…
|
H A D | bug54597.phpt | 2 Bug #54597 (incorrect years for DateTime objects created with 4-digit years) 8 $dateObject = new DateTime( 'January 0099', $tz ); 10 $dateObject = new DateTime( 'January 1, 0099', $tz ); 12 $dateObject = new DateTime( '0099-01', $tz );
|
/php-src/Zend/tests/parameter_default_values/ |
H A D | internal_declaration_error_int.phpt | 5 class MyDateTime extends DateTime 7 …blic function setTime(int $hour, int $minute, int $second = 0, bool $microsecond = false): DateTime 13 …cond = false): DateTime must be compatible with DateTime::setTime(int $hour, int $minute, int $sec…
|
/php-src/Zend/tests/type_declarations/variance/internal_parent/ |
H A D | unresolvable_inheritance_check_param.phpt | 6 class Test extends DateTime { 7 …public static function createFromFormat($format, $datetime, ?Wrong $timezone = null): DateTime|fal… 12 …mezone = null): DateTime|false and DateTime::createFromFormat(string $format, string $datetime, ?D…
|