Skip to content

Commit 79b65d9

Browse files
committed
Try to fix time format problem
Signed-off-by: ZhiFeng Hu <[email protected]>
1 parent 4c1594f commit 79b65d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rss.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func newRssItem(i *Item) *RssItem {
9292
Link: i.Link.Href,
9393
Description: i.Description,
9494
Guid: i.Id,
95-
PubDate: anyTimeFormat(time.RFC822, i.Created, i.Updated),
95+
PubDate: anyTimeFormat("2006-01-02T15:04:05-07:00", i.Created, i.Updated),
9696
}
9797

9898
intLength, err := strconv.ParseInt(i.Link.Length, 10, 64)
@@ -108,8 +108,8 @@ func newRssItem(i *Item) *RssItem {
108108

109109
// create a new RssFeed with a generic Feed struct's data
110110
func (r *Rss) RssFeed() *RssFeed {
111-
pub := anyTimeFormat(time.RFC822, r.Created, r.Updated)
112-
build := anyTimeFormat(time.RFC822, r.Updated)
111+
pub := anyTimeFormat("2006-01-02T15:04:05-07:00", r.Created, r.Updated)
112+
build := anyTimeFormat("2006-01-02T15:04:05-07:00", r.Updated)
113113
author := ""
114114
if r.Author != nil {
115115
author = r.Author.Email

0 commit comments

Comments
 (0)