Make the clock zone a deployment setting (COFFER_TZ, default UTC)

This commit is contained in:
Leora 2026-10-10 10:58:42 +08:00
parent ed6659a966
commit d2366bb18a

View File

@ -6,6 +6,7 @@ from dataclasses import asdict
from datetime import datetime from datetime import datetime
from pathlib import Path from pathlib import Path
from typing import Any from typing import Any
import os
from zoneinfo import ZoneInfo from zoneinfo import ZoneInfo
from coffer.db import CofferDB from coffer.db import CofferDB
@ -30,7 +31,7 @@ from coffer.units import (
to_subunits, to_subunits,
) )
PT = ZoneInfo("Australia/Perth") PT = ZoneInfo(os.environ.get("COFFER_TZ", "UTC")) # deployment sets its own zone
def now_pt() -> str: def now_pt() -> str: