Opened 16 years ago
Closed 14 years ago
#8153 closed defect (bug) (fixed)
Use localized dates on General Options page
Reported by: | nbachiyski | Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | I18N | Keywords: | has-patch, needs-testing |
Focuses: | Cc: |
Description
In options-general.php
dates and times are get from the vanilla date()
and gmdate()
PHP functions, which don't honor the translations of months and weekdays.
The patch also adds GMT option for date_i18n()
.
Attachments (5)
Change History (29)
#4
@
16 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Generates warnings:
Warning: Missing argument 2 for date_i18n(), called in wp-admin/options-general.php on line 124 and defined in wp-includes/functions.php on line 115
#8
@
16 years ago
If it defaulted to 0, and we interpreted 0 as current time, we wouldn't be able to call it for Jan 1, 1970 00:00:00.
#9
@
16 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
This generates incorrect dates for the timezone-shifted date.
UTC time is 2008-11-12 16:11:44 UTC -4 is 2008-11-12 11:11:44
16 - 4 != 11
@
16 years ago
If timestamp is missing use current time + offset and set gmt to true, so that the dates are shown properly. Also, use the right function in all places
#13
@
16 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
What do you think if reverting [9647] and using the fixed version in the patch, instead?
Being able to use just date_i18n(format);
sounds very appealing to me.
#17
@
16 years ago
I put in a conditional to use time() if $gmt and current_time() if not. Otherwise, you couldn't get UTC Time.
#19
@
14 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Using gmdate()
when the timezone is different from GMT breaks the T
format modifier.
Here is a patch, which tries to use the current timezone settings in order to manually replace it.
(In [9616]) Use localized dates on General Options page. Props nbachiyski. fixes #8153