We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bbd99b commit cd15786Copy full SHA for cd15786
src/SapDateTime.php
@@ -87,15 +87,17 @@ public static function createFromFormat(
87
if ($format === static::SAP_WEEK) {
88
return static::createFromSapWeek($time, $timezone);
89
}
90
+ if ($format === static::SAP_DATE && $timezone === null) {
91
+ return parent::createFromFormat($format, $time)
92
+ ->setTime(0, 0, 0);
93
+ }
94
if ($format === static::SAP_DATE) {
95
return parent::createFromFormat($format, $time, $timezone)
96
->setTime(0, 0, 0);
97
98
if ($timezone === null) {
99
return parent::createFromFormat($format, $time);
100
- //@codeCoverageIgnoreStart
101
return parent::createFromFormat($format, $time, $timezone);
- //@codeCoverageIgnoreEnd
102
103
0 commit comments