xref: /PHP-5.6/ext/date/tests/bug45554.phpt (revision c2554b4b)
1--TEST--
2Bug #45554 (Inconsistent behavior of the u format char)
3--INI--
4date.timezone=UTC
5--FILE--
6<?php
7$format = "m-d-Y H:i:s.u T";
8$d = date_create_from_format($format, "03-15-2005 12:22:29.000000 PST");
9echo $d->format($format), "\n";
10
11$d = date_create_from_format($format, "03-15-2005 12:22:29.001001 PST");
12echo $d->format($format), "\n";
13
14$d = date_create_from_format($format, "03-15-2005 12:22:29.0010 PST");
15echo $d->format($format), "\n";
16?>
17--EXPECT--
1803-15-2005 12:22:29.000000 PST
1903-15-2005 12:22:29.001001 PST
2003-15-2005 12:22:29.001000 PST
21