From ebd76ae6c50486333202f4dcc2a14936c1c24d69 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Thu, 16 Feb 2017 15:35:30 -0800 Subject: trying again with date fmt --- crawler/crawler.go | 8 +++++--- 1 file 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 { -- cgit v1.2.3