From c81dd24fe7a03415154db2cc537a7bd079a410a3 Mon Sep 17 00:00:00 2001 From: kaso17 Date: Sun, 20 May 2018 10:10:30 +0200 Subject: [PATCH] RevolutionTT: add time debug output --- src/Jackett.Common/Indexers/RevolutionTT.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Jackett.Common/Indexers/RevolutionTT.cs b/src/Jackett.Common/Indexers/RevolutionTT.cs index a2cca52e1..f7cf8fb7c 100644 --- a/src/Jackett.Common/Indexers/RevolutionTT.cs +++ b/src/Jackett.Common/Indexers/RevolutionTT.cs @@ -265,6 +265,11 @@ namespace Jackett.Common.Indexers imdbID = l; } } + var Now = DateTime.Now; + var PublishDate = DateTime.ParseExact(date, "ddd, dd MMM yyyy HH:mm:ss zz00", CultureInfo.InvariantCulture); + var PublishDateLocal = PublishDate.ToLocalTime(); + var diff = Now - PublishDateLocal; + logger.Warn(title + ": " + Now.ToString(DateTimeUtil.RFC1123ZPattern) + "; " + date + "; " + PublishDate.ToString(DateTimeUtil.RFC1123ZPattern) + "; " + PublishDateLocal.ToString(DateTimeUtil.RFC1123ZPattern) + "; " + diff.ToString() + "; "); var release = new ReleaseInfo() { @@ -273,7 +278,7 @@ namespace Jackett.Common.Indexers Guid = new Uri(string.Format(DetailsURL, torrentId)), Comments = new Uri(string.Format(DetailsURL, torrentId)), //PublishDate = DateTime.ParseExact(infoMatch.Groups["added"].Value, "yyyy-MM-dd H:mm:ss", CultureInfo.InvariantCulture), //2015-08-08 21:20:31 TODO: correct timezone (always -4) - PublishDate = DateTime.ParseExact(date, "ddd, dd MMM yyyy HH:mm:ss zz00", CultureInfo.InvariantCulture).ToLocalTime(), + PublishDate = PublishDateLocal, Link = new Uri(link), Seeders = ParseUtil.CoerceInt(infoMatch.Groups["seeders"].Value == "no" ? "0" : infoMatch.Groups["seeders"].Value), Peers = ParseUtil.CoerceInt(infoMatch.Groups["leechers"].Value == "no" ? "0" : infoMatch.Groups["leechers"].Value),