diff options
author | Adam Mathes <adam@trenchant.org> | 2017-02-16 15:37:23 -0800 |
---|---|---|
committer | Adam Mathes <adam@trenchant.org> | 2017-02-16 15:37:23 -0800 |
commit | c010e6df0f86b85f657a26f4cf301df945ff25b6 (patch) | |
tree | 90f535341070f63ad3ce80e5c2f6aabfa1ba7bbd /crawler | |
parent | ebd76ae6c50486333202f4dcc2a14936c1c24d69 (diff) | |
download | neko-c010e6df0f86b85f657a26f4cf301df945ff25b6.tar.gz neko-c010e6df0f86b85f657a26f4cf301df945ff25b6.tar.bz2 neko-c010e6df0f86b85f657a26f4cf301df945ff25b6.zip |
oops, timestamps again
Diffstat (limited to 'crawler')
-rw-r--r-- | crawler/crawler.go | 6 |
1 files 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 { |