aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawler/crawler.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/crawler/crawler.go b/crawler/crawler.go
index c352736..504b4bb 100644
--- a/crawler/crawler.go
+++ b/crawler/crawler.go
@@ -72,9 +72,11 @@ func CrawlFeed(f *feed.Feed, ch chan<- string) {
item.Description = encoded
}
- // if(i.PublishedParsed != nil) {
- // item.PublishDate = i.PublishedParsed.Format(time.RFC3339)
- // }
+ if(i.PublishedParsed != nil) {
+ item.PublishDate = i.PublishedParsed.Format("2006-01-02 15:04:05")
+ }
+ item.PublishDate = time.Now().Format("2006-01-02 15:04:05")
+
item.FeedId = f.Id
err := item.Create()
if err != nil {