Show announcement time on website landing page

This commit is contained in:
Slendy 2024-05-14 16:24:48 -05:00
commit e95f636f68
No known key found for this signature in database
GPG key ID: 7288D68361B91428

View file

@ -14,6 +14,7 @@
bool isMobile = Request.IsMobile(); bool isMobile = Request.IsMobile();
string language = Model.GetLanguage(); string language = Model.GetLanguage();
string timeZone = Model.GetTimeZone(); string timeZone = Model.GetTimeZone();
TimeZoneInfo timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById(timeZone);
} }
<h1 class="lighthouse-welcome lighthouse-title"> <h1 class="lighthouse-welcome lighthouse-title">
@Model.Translate(LandingPageStrings.Welcome, ServerConfiguration.Instance.Customization.ServerName) @Model.Translate(LandingPageStrings.Welcome, ServerConfiguration.Instance.Customization.ServerName)
@ -82,6 +83,7 @@
<a style="color: black" href="~/user/@Model.LatestAnnouncement.Publisher.UserId"> <a style="color: black" href="~/user/@Model.LatestAnnouncement.Publisher.UserId">
@Model.LatestAnnouncement.Publisher.Username @Model.LatestAnnouncement.Publisher.Username
</a> </a>
at @TimeZoneInfo.ConvertTime(Model.LatestAnnouncement.PublishedAt, TimeZoneInfo.Utc, timeZoneInfo).ToString("M/d/yyyy h:mm:ss tt")
</div> </div>
} }
</div> </div>