server icon indicating copy to clipboard operation
server copied to clipboard

English (Denmark) locale uses wrong date/time format

Open haarp opened this issue 5 years ago • 11 comments

The en_DK locale has always been a clever workaround for the lack of a proper locale that features:

  • English
  • Sane date format - ISO8601 (yyyy-mm-dd)
  • 24h time
  • week starting on Monday

Proof:

$ LC_TIME=en_US.UTF-8 date
Sat Nov 14 04:31:38 PM CET 2020
$ LC_TIME=en_DK.UTF-8 date
2020-11-14T16:31:41 CET

(Fun fact: This locale has nothing to do with Denmark, see https://unix.stackexchange.com/a/272665)

Selecting the English (Denmark) locale in Nextcloud 19.04.4 however gives you inferior mm/dd/yyyy and 12h time. This is undoubedly a bug.

#15381 is related. #15457 and #14785 are NOT related, as this issue isn't about language, but date/time formats.

Thanks!

Server configuration

Operating system: Debian Linux 10

Web server: Apache 2.4.38-3+deb10u4

Database: MariaDB 10.3.25-0+deb10u1

PHP version: 7.3.19-1~deb10u1

Nextcloud version: (see Nextcloud admin page) 19.0.4

Updated from an older Nextcloud/ownCloud or fresh install: updated

Where did you install Nextcloud from: integrated auto-installer/updater

Signing status: No errors have been found.

Nextcloud configuration:

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nope"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/nextcloud.erppc.net\/",
        "overwritewebroot": "\/",
        "htaccess.RewriteBase": "\/",
        "dbtype": "mysql",
        "version": "19.0.4.2",
        "knowledgebaseenabled": false,
        "apps_paths": [
            {
                "path": "\/var\/www\/nextcloud\/apps",
                "url": "\/apps",
                "writable": true
            }
        ],
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "loglevel": 2,
        "mail_smtpmode": "sendmail",
        "theme": "",
        "maintenance": false,
        "trashbin_retention_obligation": "auto",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "session_lifetime": 86400,
        "mysql.utf8mb4": true,
        "updater.release.channel": "stable",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "preview_max_filesize_image": 100,
        "app_install_overwrite": [
            "checksum"
        ]
    }
}

Client configuration

Browser: Firefox 82.0.2

Operating system: Linux

haarp avatar Nov 14 '20 15:11 haarp

Is this Issue still valid in NC21.0.2? If not, please close this issue. Thanks! :)

szaimen avatar Jun 17 '21 18:06 szaimen

Is this Issue still valid in NC21.0.2? If not, please close this issue. Thanks! :)

Yes. In 21.0.2:

06/17/2021 8:13:06 PM

Week starts on Monday

haarp avatar Jun 17 '21 18:06 haarp

Still an issue in 25.0.0: image

rigrig avatar Oct 27 '22 13:10 rigrig

Many english locales are wrong. English (europe) uses mm/dd/yyyy format, which is NOT used anywhere in Europe. The developers should be aware that at least some English speaking people are not from America, and that fixing bugs which were open for years might be a good thing.

asavah avatar Nov 03 '22 19:11 asavah

Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!

My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!

If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+

szaimen avatar Jan 23 '23 10:01 szaimen

Still an issue: image

image

rigrig avatar Jan 23 '23 10:01 rigrig

Seems like it is due to moment.js not having a comprehensive list of locales. The solution would be to move to another date library that rely on the Intl API.

artonge avatar Feb 21 '23 10:02 artonge

The solution would be to move to another date library that rely on the Intl API.

sounds good to me

szaimen avatar Feb 21 '23 10:02 szaimen

I confirm that the issue is still present in latest 24.0.10 version. Also English(Ireland) has wrong configuration. Week starts on Sunday instead of Monday. image

adripo avatar Mar 01 '23 17:03 adripo

@szaimen FYI moment.js development is being stopped.

As they are suggesting, maybe we don't need moment.js anymore

adripo avatar Mar 01 '23 17:03 adripo

Nextcloud 25.0.3 and Calendar 4.4.2 still exhibit this behaviour, as in shows Sunday as the left column in the calendar, when first day of week is Monday (English - Australia)

lyallp avatar Jun 14 '23 11:06 lyallp

Nextcloud 26.0.2. Denmark locale is still wrong.
Australian locale is also still wrong. We start the week on monday. Source: https://www.timeanddate.com/calendar/days/first-day-of-the-week.html An interface such as the one in synology calendar would be ideal: image

bendev25689 avatar Jun 27 '23 00:06 bendev25689

This still seems to be an issue, nextcloud 28.0.2.5

jm355 avatar Feb 10 '24 03:02 jm355