Skip to content

Commit 5748636

Browse files
committed
issue #1 set time to 00:00:00 before returning a date
1 parent bfbcf49 commit 5748636

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/SapDateTime.php

+4
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ public static function createFromFormat(
8787
if ($format === static::SAP_WEEK) {
8888
return static::createFromSapWeek($time, $timezone);
8989
}
90+
if ($format === static::SAP_DATE) {
91+
return parent::createFromFormat($format, $time, $timezone)
92+
->setTime(0, 0, 0);
93+
}
9094
return parent::createFromFormat($format, $time, $timezone);
9195
}
9296
}

0 commit comments

Comments
 (0)