summaryrefslogtreecommitdiff
path: root/ext/date/tests/bug63435.phpt
blob: dcec6e46e7f2795e1baa1901ad16b8ecb8d7b2b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
Bug #63435 	Datetime::format('u') sometimes wrong by 1 microsecond
--INI--
date.timezone=UTC
--FILE--
<?php
for ($i=1 ; $i<999 ; $i++) {
	$datetime = Datetime::createFromFormat("u", sprintf("%06ld", $i));
	$res = $datetime->format("u");
	if ($res != $i) {
		echo "$i != $res\n";
	}
}
echo "Done";
--EXPECT--
Done