aboutsummaryrefslogtreecommitdiffstats
path: root/crawler
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2017-02-16 15:35:30 -0800
committerAdam Mathes <adam@trenchant.org>2017-02-16 15:35:30 -0800
commitebd76ae6c50486333202f4dcc2a14936c1c24d69 (patch)
tree6320b2beea07bd7acaaefdc1924f1162e4afd7ae /crawler
parenta73c843f00facf83817a907420c4497ca1613d14 (diff)
downloadneko-ebd76ae6c50486333202f4dcc2a14936c1c24d69.tar.gz
neko-ebd76ae6c50486333202f4dcc2a14936c1c24d69.tar.bz2
neko-ebd76ae6c50486333202f4dcc2a14936c1c24d69.zip
trying again with date fmt
Diffstat (limited to 'crawler')
-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 {