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