Skip to content

Commit

Permalink
issue #1 set time to 00:00:00 before returning a date
Browse files Browse the repository at this point in the history
  • Loading branch information
gregor-j committed Feb 28, 2020
1 parent bfbcf49 commit 5748636
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/SapDateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ public static function createFromFormat(
if ($format === static::SAP_WEEK) {
return static::createFromSapWeek($time, $timezone);
}
if ($format === static::SAP_DATE) {
return parent::createFromFormat($format, $time, $timezone)
->setTime(0, 0, 0);
}
return parent::createFromFormat($format, $time, $timezone);
}
}

0 comments on commit 5748636

Please # to comment.