File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 4
4
5
5
class Rfc3339
6
6
{
7
- const REGEX = '/(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(\.\d+)?(Z|([+-]\d{2}):?(\d{2}))/ ' ;
7
+ const REGEX = '/^ (\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})(\.\d+)?(Z|([+-]\d{2}):?(\d{2}))$ / ' ;
8
8
9
9
/**
10
10
* Try creating a DateTime instance
Original file line number Diff line number Diff line change @@ -150,6 +150,9 @@ public function getInvalidFormats()
150
150
array ('00:00:60 ' , 'time ' ),
151
151
array ('25:00:00 ' , 'time ' ),
152
152
153
+
154
+ array ('invalid_value_2000-05-01T12:12:12Z ' , 'date-time ' ),
155
+ array ('2000-05-01T12:12:12Z_invalid_value ' , 'date-time ' ),
153
156
array ('1999-1-11T00:00:00Z ' , 'date-time ' ),
154
157
array ('1999-01-11T00:00:00+100 ' , 'date-time ' ),
155
158
array ('1999-01-11T00:00:00+1:00 ' , 'date-time ' ),
You can’t perform that action at this time.
0 commit comments