Saving Date Format or Time format not update
-
Anyone else experience that if you go on WP admin -> Settings -> General
and try to save Date Format or Time Format, it do not change/update nothing on saving?-
This topic was modified 9 years, 3 months ago by
axew3.
-
This topic was modified 9 years, 3 months ago by
-
Works for me.
WP Version : 4.7.3
WPMU: No
MySQL Version : 5.7.17
PHP Version : 7.0.16
Locale: sv_SEHave you checked that you are able to write ANY changes to the database?
Have you tried temporarily deactivating various plugins?
Have you tried temporarily going back to a standard theme (twenty-seventeen, for instance)?
(Ehm. Just to be on the safe side: This is not a mobile app/Ajax: Did you hit the “Save” button?)-
This reply was modified 9 years, 3 months ago by
tobifjellner (Tor-Bjorn “Tobi” Fjellner).
-
This reply was modified 9 years, 3 months ago by
tobifjellner (Tor-Bjorn “Tobi” Fjellner).
-
This reply was modified 9 years, 3 months ago by
tobifjellner (Tor-Bjorn “Tobi” Fjellner).
hello, sorry i have not specify that i try to save Custom on options, and it reset to the previous one i’ve set. So this affect on my test only the Custom Option.
P.s yes! all the above, included re installation!
further more, i experience that if i use:
date_i18n( 'H:i Y-m-d', $value->topic_last_post_time )
to output a timestamp, and i change timezone to whatever i change, it not change nothing. Any idea?date_i18n() assumes you are providing a local timestamp, so changing the timezone does not change its output.
When you set your custom time/date formats, if you press tab after making the change, does the example format next to the field change to your entered format? If not, you either entered an invalid format or there’s something wrong with your PHP installation.
When you say you tried Tor-Björn’s suggestions, did you have all plugins deactivated and the twentyseventeen theme active both at the same time? If your formats are valid and fail to save in this standard, “out of the box” state, especially if recently reinstalled, then there’s an issue with your server setup.
Try saving your formats directly into the options table using phpMyAdmin. The option names are date_format and time_format.
Hello! about wrong php install: my localhost return ok the result, without changing nothing, my online server (i’ve test a linux which i can’t set on any aspect) return wrong, the hour is -1, any setting i can choose about Timezone.
I’ve intended (sorry maybe i read wrong Eng, as i’ve some problem with) that if i pass to
date_i18n( 'H:i Y-m-d', $value->topic_last_post_time )
where $value->topic_last_post_time is a timestamp, than it should return the correct result, and time modified, based on setting i choose as Timezone. So maybe about this point i’m wrong?Both installations return wrong behavior about date_format and time_format if i try to save as Custom. You maybe also could experience the same if you try to setup the Custom option, it is not saved, it return set to the previous one.
I leave just the default value i find on it as placeholder, i’ve not still try out changing to something else ‘more custom’.
Yes i’ve try on a default install, and i ever use a default sixteen theme for tests. and i always disable anything to check when necessary. I’ve do also a reinstall. More than 1 time.I will find time more later to test further more maybe. I’ve also open a ticket about this.
I leave just the default value i find on it as placeholder, i’ve not still try out changing to something else ‘more custom’.
You must change the field to something “more custom” for it to stay on the custom selection. By accepting the default, it matches another default field, so that becomes the selected format. This is just how the underlying code works, it matches the selection to the assigned format, not what you clicked on. It’s not a defect.
Yes, you are wrong about date_i18n(). It does not factor in the timezone setting because it assumes the passed timestamp is for the local timezone. If you need a timezone adjustment from UTC/GMT, do it with your own code.
$local_timestamp = $value->topic_last_post_time + ( 3600 * get_option( 'gmt_offset' ))Thank you @bcworkz! Sorry! All very clear now!
No worries! Time zones and time functions are confusing, especially combined with locale settings and daylight and summer times, servers in different zones, etc. Arrrgh!
-
This reply was modified 9 years, 3 months ago by
The topic ‘Saving Date Format or Time format not update’ is closed to new replies.