File tree 2 files changed +21
-0
lines changed
2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ PHP NEWS
21
21
22
22
- Date:
23
23
. Fixed bug GH-11368 (Date modify returns invalid datetime). (Derick)
24
+ . Fixed bug GH-11600 (Can't parse time strings which include (narrow)
25
+ non-breaking space characters). (Derick)
24
26
25
27
- DOM:
26
28
. Fixed bug GH-11625 (DOMElement::replaceWith() doesn't replace node with
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug GH-11600: Intl patterns are not parseable DateTime Strings
3
+ --INI--
4
+ date.timezone=UTC
5
+ --FILE--
6
+ <?php
7
+ $ formatter = new IntlDateFormatter ('en_US ' , -1 , 3 );
8
+ $ pattern = $ formatter ->getPattern ();
9
+
10
+ $ timeString = $ formatter ->format (strtotime ('2023-07-11 16:02 ' ));
11
+
12
+ $ timestamp = strtotime ($ timeString );
13
+
14
+ var_dump ($ pattern , $ timeString , $ timestamp );
15
+ ?>
16
+ --EXPECTF--
17
+ string(8) "h:mm a"
18
+ string(9) "4:02 PM"
19
+ int(1689091320)
You can’t perform that action at this time.
0 commit comments