From afeba4dae75b6436a12b77965551da149452808a Mon Sep 17 00:00:00 2001 From: crobibero Date: Wed, 12 Aug 2020 13:07:11 -0600 Subject: [PATCH] simplify datetime parsing --- Jellyfin.Api/TypeConverters/DateTimeTypeConverter.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jellyfin.Api/TypeConverters/DateTimeTypeConverter.cs b/Jellyfin.Api/TypeConverters/DateTimeTypeConverter.cs index b6e5225b1..315b47329 100644 --- a/Jellyfin.Api/TypeConverters/DateTimeTypeConverter.cs +++ b/Jellyfin.Api/TypeConverters/DateTimeTypeConverter.cs @@ -26,15 +26,15 @@ namespace Jellyfin.Api.TypeConverters if (value is string dateString) { // Mark Played Item. - if (DateTime.TryParseExact(dateString, "yyyyMMddHHmmss", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal, out var dateTime1)) + if (DateTime.TryParseExact(dateString, "yyyyMMddHHmmss", CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal, out var dateTime)) { - return dateTime1; + return dateTime; } // Get Activity Logs. - if (DateTime.TryParse(dateString, null, DateTimeStyles.RoundtripKind, out var dateTime2)) + if (DateTime.TryParse(dateString, null, DateTimeStyles.RoundtripKind, out dateTime)) { - return dateTime2; + return dateTime; } }