]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Helper/ContentProxy.php
Added publication date
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Helper / ContentProxy.php
index f222dd88c26fced386f0328d03105e9194e9812d..5635866530def1643bcacbe987c2bb3ddbc95b4a 100644 (file)
@@ -79,6 +79,10 @@ class ContentProxy
         $entry->setContent($html);
         $entry->setHttpStatus(isset($content['status']) ? $content['status'] : '');
 
+        if (isset($content['date']) && null !== $content['date']) {
+            $entry->setPublishedAt(new \DateTime($content['date']));
+        }
+
         $entry->setLanguage(isset($content['language']) ? $content['language'] : '');
         $entry->setMimetype(isset($content['content_type']) ? $content['content_type'] : '');
         $entry->setReadingTime(Utils::getReadingTime($html));