diff --git a/services/notificationService.js b/services/notificationService.js index 582bbe0..5d98f16 100644 --- a/services/notificationService.js +++ b/services/notificationService.js @@ -1,6 +1,7 @@ const axios = require('axios'); const adminConfig = require('./adminConfig'); const { readNotificationSettings } = require('./userSettingsStore'); +const DISPLAY_TIME_ZONE = 'Europe/Berlin'; function formatDateLabel(dateInput) { try { @@ -14,7 +15,8 @@ function formatDateLabel(dateInput) { month: '2-digit', day: '2-digit', hour: '2-digit', - minute: '2-digit' + minute: '2-digit', + timeZone: DISPLAY_TIME_ZONE }); } catch (_error) { return 'unbekanntes Datum'; @@ -30,7 +32,8 @@ function formatDateOnly(dateInput) { return date.toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit', - year: 'numeric' + year: 'numeric', + timeZone: DISPLAY_TIME_ZONE }); } catch (_error) { return 'unbekanntes Datum';