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.