mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-01 11:23:36 +02:00
Add JsonDateTimeConverter
This commit is contained in:
parent
242b5a45ab
commit
d3b6a24f78
|
@ -20,7 +20,7 @@ namespace MediaBrowser.Common.Json.Converters
|
|||
/// <inheritdoc />
|
||||
public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options)
|
||||
{
|
||||
if (value.Ticks % 10_000_000 == 0)
|
||||
if (value.Millisecond == 0)
|
||||
{
|
||||
// Remaining ticks value will be 0, manually format.
|
||||
writer.WriteStringValue(value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffZ", CultureInfo.InvariantCulture));
|
||||
|
|
Loading…
Reference in a new issue