mirror of
https://codeberg.org/librarian/feeds
synced 2024-12-06 19:16:24 +01:00
Try to fix time format problem
Signed-off-by: ZhiFeng Hu <hufeng1987@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user