Try to fix time format problem

Signed-off-by: ZhiFeng Hu <hufeng1987@gmail.com>
This commit is contained in:
ZhiFeng Hu
2015-11-22 14:47:55 +08:00
parent 4c1594f80c
commit 79b65d949d
+3 -3
View File
@@ -92,7 +92,7 @@ func newRssItem(i *Item) *RssItem {
Link: i.Link.Href,
Description: i.Description,
Guid: i.Id,
PubDate: anyTimeFormat(time.RFC822, i.Created, i.Updated),
PubDate: anyTimeFormat("2006-01-02T15:04:05-07:00", i.Created, i.Updated),
}
intLength, err := strconv.ParseInt(i.Link.Length, 10, 64)
@@ -108,8 +108,8 @@ func newRssItem(i *Item) *RssItem {
// create a new RssFeed with a generic Feed struct's data
func (r *Rss) RssFeed() *RssFeed {
pub := anyTimeFormat(time.RFC822, r.Created, r.Updated)
build := anyTimeFormat(time.RFC822, r.Updated)
pub := anyTimeFormat("2006-01-02T15:04:05-07:00", r.Created, r.Updated)
build := anyTimeFormat("2006-01-02T15:04:05-07:00", r.Updated)
author := ""
if r.Author != nil {
author = r.Author.Email