Skip to content

Commit

Permalink
stay compatible with \DateTime::createFromFormat() in php < 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tflori committed Mar 26, 2019
1 parent 8888bf8 commit a9e712d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/Examples/DateTimeDerivate.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DateTimeDerivate extends \DateTime
* @param DateTimeZone|null $timezone
* @return static
*/
public static function createFromFormat($format, $time, DateTimeZone $timezone = null)
public static function createFromFormat($format, $time, $timezone = null)
{
$dt = parent::createFromFormat($format, $time, $timezone);
return new static($dt->format('Y-m-d H:i:s.u'), $dt->getTimezone());
Expand Down

0 comments on commit a9e712d

Please sign in to comment.