nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.88k stars 4.01k forks source link

[Bug]: Date format does not follow chosen locale in date picker #48442

Open Slater91 opened 2 days ago

Slater91 commented 2 days ago

⚠️ This issue respects the following points: ⚠️

Bug description

When picking a date, e.g. when sharing a link, the format used does not follow the one in the settings. In my specific case, I have set the locale to United Kingdom (so format DD-MM-YYYY), but the date in the share panel is shown as MM-DD-YYYY. See screenshot below for reference.

Screenshot_20240929_111015

Steps to reproduce

  1. Set locale to United Kingdom.
  2. Share a file from the Web interface.

Expected behavior

The date shown follows the selected locale.

Nextcloud Server version

29

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

Configuration report

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "nextcloud.robecchi.eu",
            "192.168.178.22"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "29.0.5.1",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "maintenance_window_start": 1,
        "theme": "",
        "loglevel": 3,
        "default_phone_region": "GB",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": [
            "SOS"
        ],
        "app_install_overwrite": [
            "whiteboard"
        ]
    }
}

List of activated Apps

Enabled:
  - activity: 2.21.1
  - bruteforcesettings: 2.9.0
  - calendar: 4.7.15
  - cloud_federation_api: 1.12.0
  - comments: 1.19.0
  - contacts: 6.0.0
  - contactsinteraction: 1.10.0
  - dashboard: 7.9.0
  - dav: 1.30.1
  - federatedfilesharing: 1.19.0
  - files: 2.1.1
  - files_downloadlimit: 2.0.0
  - files_pdfviewer: 2.10.0
  - files_reminders: 1.2.0
  - files_sharing: 1.21.0
  - files_trashbin: 1.19.0
  - files_versions: 1.22.0
  - firstrunwizard: 2.18.0
  - groupfolders: 17.0.2
  - logreader: 2.14.0
  - lookup_server_connector: 1.17.0
  - nextcloud_announcements: 1.18.0
  - notes: 4.10.1
  - notifications: 2.17.0
  - oauth2: 1.17.0
  - password_policy: 1.19.0
  - photos: 2.5.0
  - provisioning_api: 1.19.0
  - qownnotesapi: 24.4.0
  - recommendations: 2.1.0
  - related_resources: 1.4.0
  - serverinfo: 1.19.0
  - settings: 1.12.0
  - sharebymail: 1.19.0
  - survey_client: 1.17.0
  - suspicious_login: 7.0.0
  - tasks: 0.16.1
  - text: 3.10.1
  - theming: 2.4.0
  - twofactor_backupcodes: 1.18.0
  - twofactor_nextcloud_notification: 3.9.0
  - twofactor_totp: 11.0.0-dev
  - updatenotification: 1.19.1
  - viewer: 2.3.0
  - workflowengine: 2.11.0
Disabled:
  - admin_audit: 1.19.0
  - calendar.bak: 2.3.3
  - circles: 29.0.0-dev (installed 23.1.1)
  - encryption: 2.17.0
  - federation: 1.19.0 (installed 1.13.0)
  - files_external: 1.21.0
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - mail: 3.7.7 (installed 3.7.7)
  - metadata: 0.20.0 (installed 0.20.0)
  - privacy: 1.13.0 (installed 1.7.0)
  - support: 1.12.0 (installed 1.6.0)
  - systemtags: 1.19.0 (installed 1.13.0)
  - user_ldap: 1.20.0
  - user_status: 1.9.0 (installed 1.3.1)
  - weather_status: 1.9.0 (installed 1.3.0)
  - whiteboard: 0.0.3 (installed 0.0.3)

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

No response

susnux commented 2 days ago

This UI uses the native browser date input where not custom format is possible. You will have to configure the locale in your browser settings. The only solution we could implement is switching to a custom date time picker, but this is currently not possible due to accessibility issues.

Slater91 commented 2 days ago

Then I think there is a serious problem, because my system is set to British English and so is my browser. It should be noted that that specific dialogue is the only one which uses the American formatting, not just in Nextcloud (as far as I have seen: if you have other examples of the date picker which I can try using, let me know!) but in general.

I have tested this in both Firefox and Vivaldi, so I sincerely doubt it is a bug in the browser. Edit: I encountered the bug on Linux, but I have just tested this on Android and I can confirm it is present there, too. This seems to reinforce my idea that there is indeed an issue with the date/time picker, and it's not in the browser.

joshtrichards commented 1 day ago

Seems similar to #45447