diff options
Diffstat (limited to 'ext/date/tests/bug45554.phpt')
| -rw-r--r-- | ext/date/tests/bug45554.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/date/tests/bug45554.phpt b/ext/date/tests/bug45554.phpt new file mode 100644 index 0000000..a5042ff --- /dev/null +++ b/ext/date/tests/bug45554.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #45554 (Inconsistent behavior of the u format char) +--INI-- +date.timezone=UTC +--FILE-- +<?php +$format = "m-d-Y H:i:s.u T"; +$d = date_create_from_format($format, "03-15-2005 12:22:29.000000 PST"); +echo $d->format($format), "\n"; + +$d = date_create_from_format($format, "03-15-2005 12:22:29.001001 PST"); +echo $d->format($format), "\n"; + +$d = date_create_from_format($format, "03-15-2005 12:22:29.0010 PST"); +echo $d->format($format), "\n"; +?> +--EXPECT-- +03-15-2005 12:22:29.000000 PST +03-15-2005 12:22:29.001001 PST +03-15-2005 12:22:29.001000 PST |
