Calendar in 12- hour format despite choosing 24- hour format region and locale
Steps to reproduce
1.Create calendar entry 2.Choose start time 3.Incorrect time format
Expected behavior
I expect a correct representation of the 24-hour time format.
Actual behaviour
I've encountered an issue where the times in the calendar are displayed in 12-hour format, despite setting the timezone to Germany. I've tried it on several Nextcloud instances, and the issue persists across all of them. The old trick of changing the region to Swiss German doesn't work anymore with Calendar version 5.0.
Calendar app version
5.0
CalDAV-clients used
No response
Browser
Firefox, google chrome
Client operating system
Windows 10
Server operating system
debian 12
Web server
Nginx
Database engine version
MariaDB
PHP engine version
Other
Nextcloud version
30.0.0
Updated from an older installed version or fresh install
Updated from an older version
List of activated apps
Enabled:
- activity: 3.0.0
- analytics: 5.0.1
- announcementcenter: 7.0.0
- appointments: 2.1.10
- bruteforcesettings: 3.0.0
- calendar: 5.0.0
- call_summary_bot: 2.0.0
- cloud_federation_api: 1.13.0
- comments: 1.20.1
- contacts: 6.1.0
- contactsinteraction: 1.11.0
- dashboard: 7.10.0
- dav: 1.31.1
- deck: 1.14.0
- federatedfilesharing: 1.20.0
- federation: 1.20.0
- files: 2.2.0
- files_accesscontrol: 1.20.1
- files_antivirus: 5.5.7
- files_downloadlimit: 3.0.0
- files_pdfviewer: 3.0.0
- files_reminders: 1.3.0
- files_sharing: 1.22.0
- files_trashbin: 1.20.1
- files_versions: 1.23.0
- firstrunwizard: 3.0.0
- forms: 4.2.4
- group_default_quota: 0.1.10
- groupfolders: 18.0.1
- logreader: 3.0.0
- lookup_server_connector: 1.18.0
- nextcloud_announcements: 2.0.0
- notes: 4.11.0
- notifications: 3.0.0
- oauth2: 1.18.1
- onlyoffice: 9.3.0
- password_policy: 2.0.0
- photos: 3.0.2
- polls: 7.2.3
- privacy: 2.0.0
- provisioning_api: 1.20.0
- recommendations: 3.0.0
- related_resources: 1.5.0
- serverinfo: 2.0.0
- settings: 1.13.0
- sharebymail: 1.20.0
- spreed: 20.0.0
- support: 2.0.0
- survey_client: 2.0.0
- systemtags: 1.20.0
- tables: 0.8.0
- text: 4.1.0
- theming: 2.5.0
- twofactor_backupcodes: 1.19.0
- updatenotification: 1.20.0
- user_status: 1.10.0
- viewer: 3.0.0
- weather_status: 1.10.0
- webhook_listeners: 1.1.0-dev
- workflowengine: 2.12.0
Disabled:
- admin_audit: 1.20.0
- circles: 30.0.0-dev (installed 25.0.0)
- encryption: 2.18.0
- files_external: 1.22.0 (installed 1.19.0)
- files_mindmap: 0.0.30 (installed 0.0.30)
- suspicious_login: 8.0.0
- twofactor_nextcloud_notification: 4.0.0
- twofactor_totp: 12.0.0-dev
- user_ldap: 1.21.0
Nextcloud configuration
{
"system": {
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost",
"***REMOVED SENSITIVE VALUE***"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "30.0.0.14",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "3306",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"default_phone_region": "de",
"default_language": "de_DE",
"default_locale": "de_DE",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.local": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"maintenance": false,
"mail_smtpstreamoptions": {
"ssl": {
"allow_self_signed": true,
"verify_peer": false,
"verify_peer_name": false
}
},
"app_install_overwrite": [
"hancomoffice",
"occweb",
"deck",
"shifts",
"mindmap_app",
"backup",
"files_mindmap",
"onlyoffice",
"forms",
"appointments",
"files_antivirus"
],
"theme": "",
"loglevel": 2,
"mail_smtpsecure": "ssl",
"updater.release.channel": "stable",
"maintenance_window_start": "17",
"integrity.check.disabled": false,
"defaultapp": ""
}
}
Web server error log
inconspicuous
Log file
inconspicuous
Browser log
inconspicuous
Additional info
No response
Can you tell me both your language and locale please?
Yes, language is German and Local is German (Deutschland)
I'm also experiencing this after upgrading to Nextcloud 30. I've tried to set my personal locale settings to English (British), English (World), English (Europe), English (Canada), and nothing reverts it back to 24-hour time. I've also attempted to change my Language settings as well, with no update.
Hallo. Can the issue with the hourly display be understood yet? Are there any updates regarding this issue? Thanks for your support.
Same here after upgrading 29 -> 30. France locale, English(US) language. Tried English(UK) but still get everything in the wrong formats: m/d/y 12h.
Unfortunately I had no luck reproducing this. I tried the following combinations:
German (formally and informally) with US locale -> shows correct format for US datetime, switching back to German locale works German with English (Switzerland) -> shows mm/dd/yyyy format, switching back to German and Austrian locale works.
Can you please check your logs for any errors when setting the locale in the Personal Settings section here?
On 2024-10-03 04:16:55, Anna wrote:
Unfortunately I had no luck reproducing this. I tried the following combinations:
German (formally and informally) with US locale -> shows correct format for US datetime, switching back to German locale works German with English (Switzerland) -> shows mm/dd/yyyy format, switching back to German and Austrian locale works.
The problem isn't with month, day, year, the problem is with 12hour vs. 24 hour time.
Can you please check your logs for any errors when setting the locale in the Personal Settings section here?
If I set both of my options to German, as you show in your image, then sure I get 24 hour time. However, I cannot read German. Previously, the "Locale" setting of "English (Canada)" would also produce 24 hour time, but no longer does.
Hi,
Yes the little example in the settings page looks good, under the "locale" dropdown it is fine, but the "date of birth is not" :P
Then in calendar it does not change anything, I am still stuck with m/d/y and am/pm when displaying events:
Creating a new event is the same:
Here are the logs when I tried to switch to French language but it didn't change the formats in calendar: nc30.settings.to.french.log
Hello, I found the issue. Initially, with Nextcloud 30, there was a workaround related to OnlyOffice. It involved a temporary adjustment in ContentSecurityPolicy.php. Here, the value of "protected$strictDynamicAllowedOnScripts" was adjusted. I have reverted this adjustment in the config, which initially was supposed to fix a problem with OnlyOffice. As a result, I have resolved the following issues:
12-hour calendar display document creation into files other minor errors This should also resolve the calendar issue here.
Hello, I found the issue. Initially, with Nextcloud 30, there was a workaround related to OnlyOffice. It involved a temporary adjustment in ContentSecurityPolicy.php. Here, the value of "protected$strictDynamicAllowedOnScripts" was adjusted. I have reverted this adjustment in the config, which initially was supposed to fix a problem with OnlyOffice. As a result, I have resolved the following issues:
12-hour calendar display document creation into files other minor errors This should also resolve the calendar issue here.
You seem to be talking about https://github.com/ONLYOFFICE/onlyoffice-nextcloud/issues/1020 which involves setting protected $strictDynamicAllowedOnScripts from true to false.
I did do that, because of the OnlyOffice upgrade incompatibility, but when OnlyOffice was updated, I reverted that and I now have protected $strictDynamicAllowedOnScripts = true; , yet I still have the 12-hour calendar display issue. Was there something else you might have done?
Hello, no, I haven't done anything else to solve the problem. Of course, reboot the entire instance afterward, but otherwise, it should run as it did before. When I open the calendar app, it always briefly shows in 12-hour format but switches to 24-hour format after a second.
On 2024-10-15 05:19:33, picard74 wrote:
Hello, no, I haven't done anything else to solve the problem. Of course, reboot the entire instance afterward, but otherwise, it should run as it did before.
Yeah, I did put that variable back and the entire instance was rebooted, so I think there must be something else going on.
I also encounter this issue on 30.0.6: Local and language is set to German, but the date and time format is wrong MM/DD/YYYY as well as 12-hour format.
I'm having the same issue Nextcloud Hub 9 (30.0.6)
I have the same issue on two instances Hub 9. NC version 30.0.6 and Calendar 5.1.2 shows the issue
NC version 30.0.4 and Calendar 5.0.9 did not show this issue. After I updated Calendar to 5.1.2 this issue appeared here also.
May be this is useful.
I figured out, that this issue is obviously related to the host system settings not the Nextcloud Profile Settings.
I use a host system with en_US.UTF-8 encoding showing this issue whereas on a different machine matching the de_DE.UTF-8 host system LANG setup everything is fine.
I assume the calendar is not using NC profile settings but the host system settings?
Thanks for the feedback!
I figured out, that this issue is obviously related to the host system settings not the Nextcloud Profile Settings.
I use a host system with en_US.UTF-8 encoding showing this issue whereas on a different machine matching the de_DE.UTF-8 host system LANG setup everything is fine.
I assume the calendar is not using NC profile settings but the host system settings?
That is correct. The Calendar app uses a native datetime picker. We tell the browser the user language and let it handle the format. Unfortunately it seems that Firefox has issues with it and this is now tracked in https://github.com/nextcloud/calendar/issues/6788.
Just to avoid confusion, the ticket here covers two bugs. The older reports are about the previous, custom date picker, that sometimes didn't use the correct locale. The latest reports are about the native picker issues, as mentioned above.
It´s not just Firefox, same effect with Edge. Setting the Locale (German (Austria) in my case) just does nothing, the date format remains at MM/DD/YYYY as already mentioned by ghnp5. Even in the profile the birth date remains at MM/DD/YYYY when changing the locale. There should be a setting for the date and time format independent of the locale anyway and then this format shall be used in the calendar and everywhere else. "We tell the browser the user language and let it handle the format" - hell no, I want to choose the format.
Thank you for your feedback.
I'm not sure what's the saddest, the insane date format, or the AM/PM selectors (despite easy-peasy French/France everywhere), the fact one cannot set something that makes sense if that cannot be worked out automatically (which had been the case for many versions and many many many years), or the fact it's been months of breakages already.
I'm crying every time I have to add or edit an event. Every single time.
Please get that fixed already…
Thank you for your feedback
Same thing for me, in France. I'm trying to get a small work team to adopt Nextcloud and the spirit of free software. It's hard to get them to admit that in 2025 the calendar application's date selector displays mm-dd-yyyy and that the week begins on Sunday!
I'm having the same issue here on NC30.0.10. I managed to work around it in Chrome by going to chrome://settings/languages and changing the language to Portuguese (my native language). It was previously set to English (US). After that, Chrome started showing the time in 24-hour format again. The downside is that Chrome is now in Portuguese instead of English
I also had the issue in NC30.0.0, but with the trick that guijusto just mentioned above, it now correctly displays it as 24h and dd/mm/yyyy format (i.e. by switching the language in the Firefox settings from EN(US) to EN(GB)). I assume that somehow the browser's language and locale settings overwrite the settings within NC.
Same thing for me, in France. I'm trying to get a small work team to adopt Nextcloud and the spirit of free software. It's hard to get them to admit that in 2025 the calendar application's date selector displays mm-dd-yyyy and that the week begins on Sunday!
This as well... Not only the AM/PM, but having to start of the week not sorted as you'd expect is annoying as well :(
I have the browser set with Italian as preferred language, with English as second, and other languages afterwards.
Nextcloud Hub 9 (30.0.12) as deployed by Hetzer Storage Share.
In the user settings: language is "English (British English)", locale is "English (Ireland)"; first day of week is Monday (@naelfe, @yab228, have you checked that knob?).
The example time under the locale shows, correctly: "08/07/2025 11:42:14 Week starts on Monday". The prompt for date of bird shows, incorrectly: "mm/dd/yyyy". The calendar shows 24h times correctly, but datetime input entries are infuriating AM/PM affairs with infuriating US style mm-dd-yyyy dates.
I wrote this on an HTML file and opened it in Chrome, and it matches what Nextcloud is doing. The same file opened in Firefox shows dd-mm-yyyy dates and a 24h clock:
<form>
<input type="date" value="2025-01-20">
<input type="time" value="15:30:45">
</form>
System locale where the browser is run is "en_IE.UTF-8" on LANG and all LC_* settings. date --date='2025-03-02 18:00' correctly shows Sun 02 Mar 2025 18:00:00 CET.
Like @CyrilBrulebois, I risk a breakdown in tears every time I try to enter or change an appointment in NextCloud. I sometimes prefer to do it from my phone, where things work correctly, even if I'm in front of the computer.
It looks to me now like a problem with two sides:
- on one side, I need to work out how to convince my Chrome to input dates in a way that doesn't affect my mental health, and this has nothing to do with NextCloud.
- on the other side, it looks like all sorts of other web applications can make the HTML5 datetime entries follow user settings in the webapp, and NextCloud could consider doing the same: having a user system configured in English with a NextCloud configured in another language is a pretty valid use case where I live
I have opened https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1108940 to track the chromium issue on the Debian side. I am unable to report it to chromium upstream, nor to check it with chrome (which is likely where the issue lies). Can someone with chrome and access to chrome's issue tracker reproduce my issue and report it there, too?
I have the browser set with Italian as preferred language, with English as second, and other languages afterwards.
Nextcloud Hub 9 (30.0.12) as deployed by Hetzer Storage Share.
In the user settings: language is "English (British English)", locale is "English (Ireland)"; first day of week is Monday (@naelfe, @yab228, have you checked that knob?).
The example time under the locale shows, correctly: "08/07/2025 11:42:14 Week starts on Monday". The prompt for date of bird shows, incorrectly: "mm/dd/yyyy". The calendar shows 24h times correctly, but datetime input entries are infuriating AM/PM affairs with infuriating US style mm-dd-yyyy dates.
I wrote this on an HTML file and opened it in Chrome, and it matches what Nextcloud is doing. The same file opened in Firefox shows
dd-mm-yyyydates and a 24h clock:System locale where the browser is run is "en_IE.UTF-8" on
LANGand allLC_*settings.date --date='2025-03-02 18:00'correctly showsSun 02 Mar 2025 18:00:00 CET.Like @CyrilBrulebois, I risk a breakdown in tears every time I try to enter or change an appointment in NextCloud. I sometimes prefer to do it from my phone, where things work correctly, even if I'm in front of the computer.
It looks to me now like a problem with two sides:
* on one side, I need to work out how to convince my Chrome to input dates in a way that doesn't affect my mental health, and this has nothing to do with NextCloud. * on the other side, it looks like all sorts of other web applications can make the HTML5 datetime entries follow user settings in the webapp, and NextCloud could consider doing the same: having a user system configured in English with a NextCloud configured in another language is a pretty valid use case where I live
For me it's looking like this:
The html example looks like this when I open it with my default browser:
Just for comparison, I also checkt the contacts app:
Kind of weird, because I can use my locale notation with f.e. 05.02.2025 for the 5th of Febuary 2025- but the start of the week is not as configures in my settings.
But... it seems you are 100% correct: Both my private PC and laptop at work used to run an english OS. By chance my laptop got reset last week on a fresh OS- but this time german. It appears that calendar entries simply ignore the settings from my profile / personal info and straight up use the Browser (Firefox) language. The regional settings for Windows seem to be ignored as well. English OS, German Regional settings, English browser result in the English format in the calendar app, even though my profile has locale set to German. As soon as I add an alternativ language to FireFox and change it to german, your html excample and the calendar app show the format I want.
Would be nice if I could continue using the english Browser with my configures NC locale as I used to, before that behaviour occured.
This is so broken:
- Nextcloud is set to German with locale German (Germany)
- Firefox sends the HTTP header
Accept-Language: de,en;q=0.8,es;q=0.5,fr;q=0.3 - The Javascript variable
navigator.languageis"de"andnavigator.languagesis["de","en","es","fr"] - The
LANGenvironment variable Firefox was started with isde_DE.UTF-8
But the calendar still displays time with AM/PM and month names in English because I didn't bother to install the German language pack for Firefox. How do you even query the language Firefox uses for its menus??
exactly the same for me and nearly all my colleagues... please fix this asap. otherwise great calendar!