diff options
| author | Maxr1998 <max.rumpf1998@gmail.com> | 2021-04-04 15:04:01 +0200 |
|---|---|---|
| committer | Maxr1998 <max.rumpf1998@gmail.com> | 2021-04-04 15:13:54 +0200 |
| commit | 8d27e10cb696fb440ec7773aae69441d0651e64a (patch) | |
| tree | 6c3cdf651de9f27fca0f3279a3e1c099a4184767 /MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs | |
| parent | e0f513232b0b03135fa09fe39862c10982cb469e (diff) | |
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.
Diffstat (limited to 'MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs')
| -rw-r--r-- | MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs b/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs index e65c16ee2..da37687e8 100644 --- a/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs +++ b/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(); } |
