]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Import/PocketImport.php
Retrieve created date from Pocket
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Import / PocketImport.php
index d76a3a08fa20b7bbe91d8db4e9f41081af64d240..fe39d33fb40082f863cd9a3c9a1073a9963f2371 100644 (file)
@@ -254,6 +254,10 @@ class PocketImport extends AbstractImport
             );
         }
 
+        if (!empty($importedEntry['time_added'])) {
+            $entry->setCreatedAt((new \DateTime())->setTimestamp($importedEntry['time_added']));
+        }
+
         $this->em->persist($entry);
         ++$this->importedEntries;