diff options
| author | Jake Mannens <jake@asger.xyz> | 2023-08-28 13:15:40 +1000 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2025-08-20 00:48:43 +1000 |
| commit | 43814fb0143c0cddea903d1d107f69d527fdc559 (patch) | |
| tree | 23e90e87cc7315a0dae73606e66766b1b2f3a47b /Util.cs | |
| parent | 8f258529e94b3c5b741a0315bcd75af24b5a8b5a (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; + } +} |
