Opened 9 years ago
Last modified 10 months ago
#36259 assigned defect (bug)
Switching language should update date and time formats
Reported by: | SergeyBiryukov | Owned by: | vagios |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | I18N | Keywords: | good-first-bug has-patch needs-testing needs-unit-tests |
Focuses: | Cc: |
Description (last modified by )
Previously: #11226
- Install WordPress in English.
- Switch language to Russian.
- Date and time formats in General Settings are still
F j, Y
andg:i a
, which doesn't make sense for Russian and doesn't match the locale defaults (d.m.Y
andH:i
, respectively).
Attachments (4)
Change History (20)
#2
@
9 years ago
This would need to account for those who have set their own date and time formats though, so as not to override user settings that may differ from what we expect from a locale.
It could work by not saving the date and time formats to the database until they differ from the ones specified by the locale.
This ticket was mentioned in Slack in #core-i18n by ocean90. View the logs.
8 years ago
#5
@
8 years ago
- Keywords needs-refresh good-first-bug added
- Milestone changed from Awaiting Review to Future Release
#6
follow-up:
↓ 8
@
8 years ago
- Keywords has-patch added
In 36259.patch, if the locale's default date/time format is used, after the update the new locale's default values will be used. In any other case the code works as before.
#8
in reply to:
↑ 6
@
8 years ago
Replying to vagios:
In 36259.patch, if the locale's default date/time format is used, after the update the new locale's default values will be used. In any other case the code works as before.
I just tested this patch, and if left on the default time format it changes to the one specific to the chosen country.
Before applying the patch I confirmed that the old local was going into the custom format and active.
#9
@
7 years ago
- Owner set to vagios
- Status changed from new to assigned
Assigning ownership to mark the good-first-bug
as "claimed".
#12
@
6 years ago
- Milestone changed from 5.1 to Future Release
Patch needs a refresh, testing, and review.
#14
@
3 years ago
It is all good to mark https://core.trac.wordpress.org/ticket/54923 as duplicate but this is a six year old bug, which still has no defined milestone. How can we attract attention to it?
I find it strange that a bug that allowed a general setting, which has a dedicated page, to fail for six years. (I assume the code is the same between .com and .org.)
#15
@
23 months ago
I agree with @sarumbear this seems to be forgotten about. I have custom post types that use the published date and it is confusing and irritating not being able to change the dates in the admin to UK format i.e. dd/mm/yyyy. Please get this looked at.
#16
@
10 months ago
- Keywords needs-testing needs-unit-tests added; needs-refresh removed
I've updated the patch to work with the current WordPress version. Also, in the original patch, the update_option
calls were performed before the translations of the new locale were loaded. I've moved the calls to be performed right after the switch is made.
This patch seems to be working correctly, see the screenshots above. I think this could use some unit tests moving forward.
This would need to account for those who have set their own date and time formats though, so as not to override user settings that may differ from what we expect from a locale.