Skip to content

Commit

Permalink
do not lose microseconds when converting datetime objects
Browse files Browse the repository at this point in the history
  • Loading branch information
gharlan committed Feb 5, 2017
1 parent dd3ad68 commit 51e5d57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/AbstractDateTime.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static function createFromDateTime(\DateTimeInterface $dateTime): self

$class = static::getClass();

return new $class($dateTime->format('Y-m-d H:i:s'), $dateTime->getTimezone());
return new $class($dateTime->format('Y-m-d H:i:s.u'), $dateTime->getTimezone());
}

/**
Expand Down

0 comments on commit 51e5d57

Please sign in to comment.