Fix: Container-Zeitzone Europe/Berlin (Januar fehlte, Ladetage nicht markiert)
Ursache: Container lief in UTC, waehrend die Flux-Aggregation Europe/Berlin nutzt. Dadurch lagen die in JS (Lokalzeit) berechneten Monats-/Tagesgrenzen eine Stunde neben den Flux-Balken: - Januar-Balken (Berlin = 31.12. 23:00 UTC) lag vor 'start' (UTC) und wurde weggefiltert. - Ladetag-Zeitstempel (UTC-Mitternacht) passten nicht auf die Verbrauchsbalken (Berliner Mitternacht) -> keine Markierung. Fix: tzdata ins Image + TZ=Europe/Berlin (Dockerfile und compose). Damit stimmt die JS-Lokalzeit mit der Flux-Location ueberein. Verifiziert: im Container ergibt new Date(2026,0,1) den Berliner Monatsanfang. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,11 @@ WORKDIR /app
|
|||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
|
|
||||||
|
# Zeitzone Europe/Berlin: JS-Lokalzeit muss mit der Flux-Aggregation (Berlin)
|
||||||
|
# uebereinstimmen, sonst werden Tages-/Monatsgrenzen falsch zugeordnet.
|
||||||
|
RUN apk add --no-cache tzdata
|
||||||
|
ENV TZ=Europe/Berlin
|
||||||
|
|
||||||
RUN addgroup --system --gid 1001 nodejs
|
RUN addgroup --system --gid 1001 nodejs
|
||||||
RUN adduser --system --uid 1001 nextjs
|
RUN adduser --system --uid 1001 nextjs
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ services:
|
|||||||
- "${STROM_PORT:-3000}:3000"
|
- "${STROM_PORT:-3000}:3000"
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
|
# Zeitzone (muss zur Flux-Aggregation Europe/Berlin passen)
|
||||||
|
- TZ=Europe/Berlin
|
||||||
# InfluxDB im smarthome-Netz
|
# InfluxDB im smarthome-Netz
|
||||||
- INFLUX_URL=http://influxdb:8086
|
- INFLUX_URL=http://influxdb:8086
|
||||||
- INFLUX_TOKEN=${INFLUX_TOKEN}
|
- INFLUX_TOKEN=${INFLUX_TOKEN}
|
||||||
|
|||||||
Reference in New Issue
Block a user