From 9f9caca192ac5b440ed8dccce76861de5978939d Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Mon, 28 Aug 2023 13:15:40 +1000 Subject: Modified media controller to take file metadata and checksums from form content headers --- Util.cs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Util.cs (limited to 'Util.cs') diff --git a/Util.cs b/Util.cs new file mode 100644 index 0000000..9cbccdf --- /dev/null +++ b/Util.cs @@ -0,0 +1,8 @@ +namespace HyperBooru.Util; + +public static class Extensions { + public static DateTime? TryParseDateTimeUtc(this string s) { + bool success = DateTime.TryParse(s, out var dateTime); + return success ? DateTime.SpecifyKind(dateTime, DateTimeKind.Utc) : null; + } +} -- cgit v1.3