fix timezone problem issue#2

pull/24/head
Akhil Gupta 4 years ago
parent a0b96c0044
commit 3ad01a7e48

@ -84,6 +84,9 @@ func AddPodcastItems(podcast *db.Podcast) error {
if errors.Is(err, gorm.ErrRecordNotFound) { if errors.Is(err, gorm.ErrRecordNotFound) {
duration, _ := strconv.Atoi(obj.Duration) duration, _ := strconv.Atoi(obj.Duration)
pubDate, _ := time.Parse(time.RFC1123Z, obj.PubDate) pubDate, _ := time.Parse(time.RFC1123Z, obj.PubDate)
if (pubDate == time.Time{}) {
pubDate, _ = time.Parse(time.RFC1123, obj.PubDate)
}
var downloadStatus db.DownloadStatus var downloadStatus db.DownloadStatus
if i < limit { if i < limit {
downloadStatus = db.NotDownloaded downloadStatus = db.NotDownloaded

Loading…
Cancel
Save