From 61b122e88cc6783b4d0cf5142a22002f8e558c60 Mon Sep 17 00:00:00 2001 From: winter Date: Sat, 15 Mar 2025 18:35:59 +0000 Subject: implement pages --- misc/format_datetime.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'misc/format_datetime.php') diff --git a/misc/format_datetime.php b/misc/format_datetime.php index 1a4db52..96ca3a2 100644 --- a/misc/format_datetime.php +++ b/misc/format_datetime.php @@ -1,5 +1,8 @@ setTimeZone($tz ?? $dt->getTimezone()); + static $user = UserAccount::findByCurrentSession(); + static $prefs = $user == null ? null : new UserSettings($user); + + $formatter->setTimeZone($tz ?? $prefs?->get('locale.timezone') ?? $dt->getTimezone()); return $formatter->format($dt); } \ No newline at end of file -- cgit v1.3