feat(config): TZ + NTP_SERVER in .env mit sinnvollen Defaults
- .env / .env.example: TZ=Europe/Berlin und NTP_SERVER=ptbtime1.ptb.de (offizielle deutsche Zeitreferenz, hohe Verfuegbarkeit) - app/__init__.py setzt prozessweite Zeitzone frueh via os.environ+tzset - Leichtgewichtiger SNTP-Client (pure socket, keine deps) prueft den Uhr-Offset beim Start im Hintergrund-Thread und warnt bei Abweichung >5s - Dockerfile installiert tzdata und ENV TZ=Europe/Berlin als Fallback Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -40,3 +40,8 @@ class Config:
|
||||
|
||||
# CORS
|
||||
FRONTEND_URL = os.environ.get('FRONTEND_URL', 'http://localhost:3000')
|
||||
|
||||
# Zeitzone (prozessweit, wirkt nach time.tzset())
|
||||
TIMEZONE = os.environ.get('TZ', 'Europe/Berlin')
|
||||
# NTP-Server fuer Offset-Check beim Start. Leerstring deaktiviert den Check.
|
||||
NTP_SERVER = os.environ.get('NTP_SERVER', 'ptbtime1.ptb.de')
|
||||
|
||||
Reference in New Issue
Block a user