Add permalink import

- Fill publish date on post edit page
This commit is contained in:
2022-04-29 23:46:26 -04:00
parent afca5edfdd
commit c07f1b11c9
7 changed files with 83 additions and 22 deletions

View File

@@ -264,6 +264,11 @@ module WebLog =
/// Convert a permalink to an absolute URL
let absoluteUrl webLog = function Permalink link -> $"{webLog.urlBase}{link}"
/// Convert a date/time to the web log's local date/time
let localTime webLog (date : DateTime) =
let tz = TimeZoneInfo.FindSystemTimeZoneById webLog.timeZone
TimeZoneInfo.ConvertTimeFromUtc (DateTime (date.Ticks, DateTimeKind.Utc), tz)
/// A user of the web log