Configure Clock from TimeZone setting at startup
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user