--TEST--
-DateInterval::format()
+DateInterval::format(), except %a
+--DESCRIPTION--
+%a is covered in a separate test.
+Don't want an XFAIL here to cause confusion if a real bug comes up.
--CREDITS--
Daniel Convissor <danielc@php.net>
# TestFest 2010 BKTK
echo $interval->format('i=%i') . "\n";
echo $interval->format('s=%s') . "\n";
echo $interval->format('r=%r') . "\n";
-echo $interval->format('a=%a') . "\n";
echo "\n";
i=5
s=6
r=
-a=428
inverted R=-
inverted r=-
--- /dev/null
+--TEST--
+DateInterval::format(), %a
+--CREDITS--
+Daniel Convissor <danielc@php.net>
+# TestFest 2010 BKTK
+--INI--
+date.timezone=UTC
+--SKIPIF--
+<?php
+if (!method_exists('DateInterval', 'format')) die("skip: method doesn't exist");
+if (substr(PHP_OS, 0, 3) != 'WIN') die("skip this test is for Windows platforms only");
+?>
+--XFAIL--
+Windows VC6 libs' floor()/ceil() choke on floats
+--FILE--
+<?php
+
+$date1 = new DateTime('2000-01-01 00:00:00');
+$date2 = new DateTime('2001-03-04 04:05:06');
+
+$interval = $date1->diff($date2);
+
+echo $interval->format('a=%a') . "\n";
+
+?>
+--EXPECT--
+a=428
--- /dev/null
+--TEST--
+Bug #52062: large timestamps with DateTime::getTimestamp and DateTime::setTimestamp (64 bit)
+--SKIPIF--
+<?php
+if (PHP_INT_SIZE == 4) die('skip 64 bit only');
+?>
+--INI--
+date.timezone=UTC
+--FILE--
+<?php
+$d = new DateTime('@100000000000');
+var_dump($d->format('Y-m-d H:i:s U'));
+var_dump($d->getTimestamp());
+
+$d->setTimestamp(100000000000);
+var_dump($d->format('Y-m-d H:i:s U'));
+var_dump($d->getTimestamp());
+
+$i = new DateInterval('PT100000000000S');
+var_dump($i->format('%s'));
+?>
+--EXPECT--
+string(32) "5138-11-16 09:46:40 100000000000"
+int(100000000000)
+string(32) "5138-11-16 09:46:40 100000000000"
+int(100000000000)
+string(12) "100000000000"
--TEST--
-Bug #52062: large timestamps with DateTime::getTimestamp and DateTime::setTimestamp
+Bug #52062: large timestamps with DateTime::getTimestamp and DateTime::setTimestamp (32 bit)
--SKIPIF--
<?php
-if (PHP_INT_SIZE == 4) die('skip tests require 64bit integer (php\' int, long in C.');
+if (PHP_INT_SIZE == 8) die('skip 32-bit only');
?>
--INI--
date.timezone=UTC
--TEST--
Bug #53502: strtotime with timezone memory leak
+--INI--
+date.timezone=UTC
--FILE--
<?php
for ($i = 0; $i < 1000; $i++) {
--TEST--
date_default_timezone_set() function [1]
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') die('skip diff TZ detection on windows.');
+?>
--INI--
date.timezone=
--FILE--