Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Fix incorrect rfc date format

Cette révision appartient à :
PantsuDev 2017-08-03 12:49:06 +10:00
Parent 4470762051
révision 71b033ccb4
3 fichiers modifiés avec 3 ajouts et 6 suppressions

Voir le fichier

@ -4,7 +4,6 @@ import (
"net/http"
"strconv"
"strings"
"time"
"github.com/NyaaPantsu/nyaa/config"
"github.com/NyaaPantsu/nyaa/utils/feeds"
@ -39,7 +38,7 @@ func RSSEztvHandler(c *gin.Context) {
},
Description: string(torrentJSON.Description),
Comments: config.WebAddress() + "/view/" + strconv.FormatUint(uint64(torrentJSON.ID), 10),
PubDate: torrent.Date.Format(time.RFC822),
PubDate: torrent.Date.Format("Mon Jan 02 15:04:05 -0700 2006"),
GUID: config.WebAddress() + "/view/" + strconv.FormatUint(uint64(torrentJSON.ID), 10),
Enclosure: &nyaafeeds.RssEnclosure{
URL: config.WebAddress() + "/download/" + strings.TrimSpace(torrentJSON.Hash),

Voir le fichier

@ -4,7 +4,6 @@ import (
"net/http"
"strconv"
"strings"
"time"
"github.com/NyaaPantsu/nyaa/config"
"github.com/NyaaPantsu/nyaa/utils/feeds"
@ -36,7 +35,7 @@ func RSSMagnetHandler(c *gin.Context) {
Title: torrentJSON.Name,
Link: &nyaafeeds.RssMagnetLink{Text: string(torrentJSON.Magnet)},
Description: string(torrentJSON.Description),
PubDate: torrent.Date.Format(time.RFC822),
PubDate: torrent.Date.Format("Mon Jan 02 15:04:05 -0700 2006"),
GUID: config.WebAddress() + "/view/" + strconv.FormatUint(uint64(torrentJSON.ID), 10),
Enclosure: &nyaafeeds.RssEnclosure{
URL: config.WebAddress() + "/download/" + strings.TrimSpace(torrentJSON.Hash),

Voir le fichier

@ -4,7 +4,6 @@ import (
"net/http"
"strconv"
"strings"
"time"
"github.com/NyaaPantsu/nyaa/config"
"github.com/NyaaPantsu/nyaa/utils/feeds"
@ -36,7 +35,7 @@ func RSSHandler(c *gin.Context) {
Title: torrentJSON.Name,
Link: config.WebAddress() + "/download/" + torrentJSON.Hash,
Description: string(torrentJSON.Description),
PubDate: torrent.Date.Format(time.RFC822),
PubDate: torrent.Date.Format("Mon Jan 02 15:04:05 -0700 2006"),
GUID: config.WebAddress() + "/view/" + strconv.FormatUint(uint64(torrentJSON.ID), 10),
Enclosure: &nyaafeeds.RssEnclosure{
URL: config.WebAddress() + "/download/" + strings.TrimSpace(torrentJSON.Hash),