diff --git a/src/Jackett.Common/Utils/DateTimeUtil.cs b/src/Jackett.Common/Utils/DateTimeUtil.cs index dccff18f6..7067dee8b 100644 --- a/src/Jackett.Common/Utils/DateTimeUtil.cs +++ b/src/Jackett.Common/Utils/DateTimeUtil.cs @@ -176,16 +176,12 @@ namespace Jackett.Common.Utils return dt; } - try + // try parsing the str as an unix timestamp + if (long.TryParse(str, out var unixTimeStamp)) { - // try parsing the str as an unix timestamp - var unixTimeStamp = long.Parse(str); return UnixTimestampToDateTime(unixTimeStamp); } - catch (FormatException) - { - // it wasn't a timestamp, continue.... - } + // it wasn't a timestamp, continue.... // add missing year match = _MissingYearRegexp.Match(str);