Skip to content

Commit 49cc96e

Browse files
author
Shashank Jain
committed
Fix: date parse bug fix
1 parent 374a329 commit 49cc96e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ApiModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ protected function asDateTime($value)
180180
}
181181

182182
// Parse ISO 8061 date
183-
if (preg_match('/^(\d{4})-(\d{1,2})-(\d{1,2}T(\d{2}):(\d{2}):(\d{2})\\+(\d{2}):(\d{2}))$/', $value)) {
183+
if (preg_match('/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\\+(\d{2}):(\d{2})$/', $value)) {
184184
return Carbon::createFromFormat('Y-m-d\TH:i:s+P', $value);
185185
}
186186
elseif (preg_match('/^(\d{4})-(\d{1,2})-(\d{1,2}T(\d{2}):(\d{2}):(\d{2})\\.(\d{1,3})Z)$/', $value)) {

0 commit comments

Comments
 (0)