Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Try to fix Incorrect format detection
Should fix #829
  • Loading branch information
solracsf authored and ArtificialOwl committed Apr 5, 2022
commit 9aa3f278560491ef2099672e29587cc3eb0c3887
3 changes: 2 additions & 1 deletion lib/Model/Circle.php
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,8 @@ public function importFromDatabase(array $data, string $prefix = ''): IQueryRow
->setDescription($this->get($prefix . 'description', $data));

$creation = $this->get($prefix . 'creation', $data);
$this->setCreation(DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp());
$timestamp = DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp() ?? (int) strtotime('Y-m-d H:i:s', $creation);
$this->setCreation($timestamp);

$this->setPopulation($this->getInt('population', $this->getSettings()));
$this->setPopulationInherited($this->getInt('populationInherited', $this->getSettings()));
Expand Down