Date format for English (South Africa)

Nextcloud version (eg, 20.0.5): 21.0.8
Operating system and version (eg, Ubuntu 20.04): docker-compose on Debian 11
Apache or nginx version (eg, Apache 2.4.25): nextcloud:21.0.8-fpm
PHP version (eg, 7.4): 7.4

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. Log in as any user, go into Settings->Personal info
  2. Select the locale as English (South Africa)
  3. The date format should be YYYY-MM-DD, YYYY/MM/DD or DD/MM/YYYY but is showing as MM/DD/YYYY

date +%x on Debian systems with en_ZA.UTF-8 shows DD/MM/YYYY, which is what most people here use.

I have tried to find where Nextcloud is getting the date formats from with no luck. I did find /var/www/html/resources/locales.json, but there’s no reference to date formatting that I can find in there.

I just wanted to check if anyone has any leads on where to look before I open an issue on github. Any direction would be appreciated.

More info on the standards:

https://metacpan.org/dist/DateTime-Locale/view/lib/DateTime/Locale/en_ZA.pod#%x-(%d/%m/%Y)-date-format

Thanks for your time

There have been similar reports before:

The bugtracker is the place for this to be fixed.

1 Like

Thanks. I don’t know how I missed that one in my several days of searching. This ticket also lead me to a bit more info.

I don’t have much hope of this getting fixed though, as most these tickets aren’t fixed yet after a year or two, but I’ll give it a shot.

Appreciate the response, it helps.

For me it was not clear where this issue can be fixed. Is this a 3rd-party library or a file already in the repository. The change itself should be easy then. You can apply it in your setup, or make a pull request for everybody. Each country should have one default date/time format.

1 Like