From c010e6df0f86b85f657a26f4cf301df945ff25b6 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Thu, 16 Feb 2017 15:37:23 -0800 Subject: oops, timestamps again --- crawler/crawler.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crawler/crawler.go b/crawler/crawler.go index 504b4bb..0782c8f 100644 --- a/crawler/crawler.go +++ b/crawler/crawler.go @@ -75,8 +75,10 @@ func CrawlFeed(f *feed.Feed, ch chan<- string) { 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") - + else { + 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