mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Fixed problems with invalid dates during PartKeepr import with MySQL
See issue #473
This commit is contained in:
parent
78bd858ebb
commit
e2146332dc
1 changed files with 1 additions and 1 deletions
|
@ -224,7 +224,7 @@ trait PKImportHelperTrait
|
|||
*/
|
||||
protected function setCreationDate(TimeStampableInterface $entity, ?string $datetime_str)
|
||||
{
|
||||
if ($datetime_str) {
|
||||
if ($datetime_str !== null && $datetime_str !== '' && $datetime_str !== '0000-00-00 00:00:00') {
|
||||
$date = new \DateTime($datetime_str);
|
||||
} else {
|
||||
$date = null; //Null means "now" at persist time
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue