aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2017-02-16 15:37:23 -0800
committerAdam Mathes <adam@trenchant.org>2017-02-16 15:37:23 -0800
commitc010e6df0f86b85f657a26f4cf301df945ff25b6 (patch)
tree90f535341070f63ad3ce80e5c2f6aabfa1ba7bbd
parentebd76ae6c50486333202f4dcc2a14936c1c24d69 (diff)
downloadneko-c010e6df0f86b85f657a26f4cf301df945ff25b6.tar.gz
neko-c010e6df0f86b85f657a26f4cf301df945ff25b6.tar.bz2
neko-c010e6df0f86b85f657a26f4cf301df945ff25b6.zip
oops, timestamps again
-rw-r--r--crawler/crawler.go6
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 {