diff options
| author | Jake Mannens <jake@asger.xyz> | 2023-08-28 13:15:40 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2023-08-28 13:15:40 +1000 |
| commit | 9f9caca192ac5b440ed8dccce76861de5978939d (patch) | |
| tree | 87a93191376d2bb1ab91b43854c293f0b3d827df /Util.cs | |
| parent | ff1b492c53b44fa10e7cd4170b4cfb0b7bfdc6e9 (diff) | |
Modified media controller to take file metadata and checksums from form content headers
Diffstat (limited to 'Util.cs')
| -rw-r--r-- | Util.cs | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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; + } +} |
