aboutsummaryrefslogtreecommitdiff
path: root/Timeline
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-12-11 00:34:24 +0800
committercrupest <crupest@outlook.com>2019-12-11 00:34:24 +0800
commit41e33d570ac7181824b7cd3612010bb1962af540 (patch)
tree8b44c5fb9d1971684c1df417688c1ccdf1f8a415 /Timeline
parentf19dc927d773a86e9385c38d07a6e239f4f6c5fa (diff)
downloadtimeline-41e33d570ac7181824b7cd3612010bb1962af540.tar.gz
timeline-41e33d570ac7181824b7cd3612010bb1962af540.tar.bz2
timeline-41e33d570ac7181824b7cd3612010bb1962af540.zip
Fix the format in date string.
Note: Because standard date time format "s" in Dot Net does not add "Z" at the tail of the result string even if the date is UTC. So I manually add it so that web browser can correctly parse the date string.
Diffstat (limited to 'Timeline')
-rw-r--r--Timeline/Models/Converters/JsonDateTimeConverter.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Timeline/Models/Converters/JsonDateTimeConverter.cs b/Timeline/Models/Converters/JsonDateTimeConverter.cs
index 551bbbaa..69af53c1 100644
--- a/Timeline/Models/Converters/JsonDateTimeConverter.cs
+++ b/Timeline/Models/Converters/JsonDateTimeConverter.cs
@@ -17,7 +17,7 @@ namespace Timeline.Models.Converters
public override void Write(Utf8JsonWriter writer, DateTime value, JsonSerializerOptions options)
{
- writer.WriteStringValue(value.ToUniversalTime().ToString("s", CultureInfo.InvariantCulture));
+ writer.WriteStringValue(value.ToUniversalTime().ToString("s", CultureInfo.InvariantCulture) + "Z");
}
}
}