From a911186f5d72cfd032802518790e97698164ae80 Mon Sep 17 00:00:00 2001 From: jessikitty Date: Sun, 23 Aug 2026 00:05:32 +1000 Subject: [PATCH] Configure Clock from TimeZone setting at startup --- Program.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Program.cs b/Program.cs index 423a32a..c72aee2 100644 --- a/Program.cs +++ b/Program.cs @@ -1,9 +1,15 @@ using Microsoft.EntityFrameworkCore; using Microsoft.AspNetCore.Authentication.Cookies; using NoticeBoard.Data; +using NoticeBoard.Infrastructure; var builder = WebApplication.CreateBuilder(args); +// Configure the shared "now" used for Meow expiry checks. Blank ("" or unset) keeps the +// original behaviour (host machine's local time zone, e.g. IIS on a Windows Server set to +// AEST). Docker's compose file sets this to "UTC" by default — see docker-compose.yml. +Clock.Configure(builder.Configuration["TimeZone"]); + // SQLite database. Defaults to the app's own directory (unchanged behaviour for IIS). // Set the "DataDirectory" setting (env var DataDirectory=... in Docker) to store the // database elsewhere — used by the Docker image so the DB lives on a mounted volume.