Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date format not updating with User Settings Interface Language #117

Closed
gavin-murphy opened this issue Jun 11, 2019 · 8 comments
Closed

Date format not updating with User Settings Interface Language #117

gavin-murphy opened this issue Jun 11, 2019 · 8 comments

Comments

@gavin-murphy
Copy link

WIth latest SilverStripe 4.x the Site Settings no longer have user-specified date formats. Instead, there is a higher level 'Interface Language'.
Our users are expecting that new field to drive date formats elsewhere in the CMS, including the versioned admin views.
E.g. a user with English (US) might expect a MM/DD/YYYY format, whilst an English (UK) user might expect DD/MM/YYYY, say.
The versioned admin module doesn't change date formats in accordance with this user setting.

@chillu
Copy link
Member

chillu commented Jun 19, 2019

Note that the explicit date/time preferences were removed on purpose from member settings, see silverstripe/silverstripe-framework#6626

Remove date/time format customisation in admin/myprofile: It no longer applies for a large amount of use cases (date fields for 85% of users on HTML5 browsers). It means readonly dates (e.g. page history view) will use the default for your locale, but that's acceptable. Admins could still override the locale format globally for all users through YAML config.

This is mentioned in the changelog: https://docs.silverstripe.org/en/4/changelogs/4.0.0/#member-date-time-fields

Every locale selected as an "interface language" should have a default format though, and we should make it easy to apply this.

Gavin, I'm assuming you're talking about this here?
image

@gavin-murphy
Copy link
Author

gavin-murphy commented Jun 19, 2019 via email

@brynwhyman
Copy link

brynwhyman commented Jun 19, 2019

I don't want to confuse things here but I'm running version silverstripe/versioned-admin 1.2.x-dev(with cwp/cwp 2.3.x-dev, silverstripe/framework 4.4.x-dev) and changing the Interface Language at a user profile level updates the date format in the page history viewer (and other places) to the new date format I'm expecting.

With the Interface Language changed to 'English (United Kingdom)' I see:

image

If I change the Interface Language back to 'US' I see US date/time formats. I can't see anything implemented in cwp/cwp that's introducing this on top of core, but I'm not a developer :P

@brynwhyman
Copy link

That's also what I'd expect, based on the docs: https://docs.silverstripe.org/en/4/developer_guides/i18n/#date-and-time-formats

@gavin-murphy
Copy link
Author

gavin-murphy commented Jun 20, 2019 via email

@chillu
Copy link
Member

chillu commented Jun 20, 2019

Ooooh, we've fixed this in 4.4, it's broken in 4.3.

4.3

image

4.4

image

@chillu chillu closed this as completed Jun 20, 2019
@gavin-murphy
Copy link
Author

gavin-murphy commented Jun 20, 2019 via email

@brynwhyman
Copy link

brynwhyman commented Jun 20, 2019

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants