xref: /php-src/ext/date/tests/bug-gh11600.phpt (revision 57229836)
1--TEST--
2Bug GH-11600: Intl patterns are not parseable DateTime Strings
3--EXTENSIONS--
4intl
5--INI--
6date.timezone=UTC
7--FILE--
8<?php
9$formatter = new IntlDateFormatter('en_US', -1, 3);
10$pattern = $formatter->getPattern();
11
12$timeString = $formatter->format(strtotime('2023-07-11 16:02'));
13
14$timestamp = strtotime("2023-07-11 {$timeString}");
15
16var_dump($pattern, $timeString, $timestamp);
17?>
18--EXPECTF--
19string(%d) "h:mm%sa"
20string(%d) "4:02%sPM"
21int(1689091320)
22