Page tree
Skip to end of metadata
Go to start of metadata

Time zone is a locale parameter whose setting has an effect on the content of, for instance, the date field before any date is entered in it. The field shows a pseudo-placeholder text that changes according to the actual (user's) time zone setting, compare:

  

Quite naturally, two different English-speaking editors, one working in London and the other one in Berlin, will want to use their local times in many applications of such a field. The London user will prefer thinking and working in Greenwich Mean Time, while the Berliner in Central European Time.

In addition, the form of the time zone placeholder depends not only the time zone setting, but also on the language setting. If the preferred working language of the editor in Berlin were German rather than English, the hint could show MEZ (abbrev. of Mitteleuropäische Zeit) instead of CET (abbrev. of Central European Time). 

Changing the time zone in the AdminCentral

The default time zone of the AdminCentral is set via the getDefault method of the java.util.TimeZone class, which creates a time zone based on the time zone where the server is running. 

You may change the way time zone is displayed in the UI through the Edit user profile dialog. To change it, open the pull down menu in the top right corner of the browser window and click the first row of the menu. On the Preferences tab, choose a timezone in the Time zone field:

 The new time zone setting will be applied the next time you log in into the AdminCentral.

All content in Magnolia is stored in the default time zone. By changing the time zone in user profile you control how the default time zone is rendered in the UI.

The server uses the default time zone (the server time) to store the dates you enter in date/time fields. Consider the following example with a custom field called myDate, which has the time property set to true.

If both server and user time zones are set to CET (default, UTC+1) and in the period of the year which observes the daylight saving time you enter 2019-07-12 04:00 in the custom field, the value will be saved to JCR as follows:

'myDate': 2019-07-12T04:00:00.000+02:00

However, if server time zone is CET but user time zone is PST (UTC-8), and you enter the same value (2019-07-12 04:00) in the field, Magnolia will not store the value as

'myDate': 2019-07-12T04:00:00.000-07:00

but rather as a transcoded value seen from the server's perspective, keeping the server's UTC offset as the baseline:

'myDate': 2019-07-12T13:00:00.000+02:00

  • No labels