فهرست منبع

Interpret ffprobe date as UTC

Currently, dates are parsed according to the local time, which results in potentially wrong data being stored in the database after normalizing to UTC - e.g. 2021-04-04 would be stored as '2021-04-03 22:00:00Z' and displayed in the UI as 03.04.2021.
Maxr1998 4 سال پیش
والد
کامیت
8d27e10cb6
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs

+ 2 - 1
MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs

@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Globalization;
 
 namespace MediaBrowser.MediaEncoding.Probing
 {
@@ -90,7 +91,7 @@ namespace MediaBrowser.MediaEncoding.Probing
                 return null;
             }
 
-            if (DateTime.TryParse(val, out var i))
+            if (DateTime.TryParse(val, DateTimeFormatInfo.CurrentInfo, DateTimeStyles.AssumeUniversal, out var i))
             {
                 return i.ToUniversalTime();
             }