-
- Notifications
You must be signed in to change notification settings - Fork 504
Description
Problem
If the SYSTEM_SERVER_TIMEZONE setting is left empty in the admin page (Settings, not User Interface!), the frontend retrieves that as "null" (a string, not an actual null) when it reads the gnConfig["system.server.timeZone"] setting.
You can tell that this happens by looking at the date time picker, where the label, name and offset for the timezone presets are concatenated, showing "null" as the name:
The Moment.js library on the frontend side converts "null" into a +00:00 timezone (UTC) offset.
However, this may not represent the actual server timezone at all!
Proposal
When the system settings are retrieved from the backend by doing a GET on ../api/site/settings, the backend should set the actual JVM default timezone (as mentioned in the description on the admin page) before returning the response.
-OR-
If the SYSTEM_SERVER_TIMEZONE setting is omitted, the backend should set it to the JVM default timezone when it saves the settings.