Support » Fixing WordPress » Date format not displaying correctly

  • Resolved duncanstephen


    I have noticed that the date format is not displaying correctly, possibly since the upgrade to 5.0.

    I have set the date to display as j F Y, which should return a date that looks like “8 December 2018”. But it displays instead as “8 Dec 2018”. I have experimented with editing the format string without success.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 18 total)
  • Hi @duncanstephen,

    Just to make sure, can you post the code used to output the date? I’m not getting the same issue on 5.0.

    — Anders

    Hi @anlino, thanks for your reply.

    Here’s the code I’m using to output the date.

    <?php the_time(get_option('date_format')); ?>

    I’ll also point out that when I try to edit the date format under General Settings in the admin interface, the preview also displays incorrectly even though I have set it as j F Y.

    @duncanstephen Can you try activating one of the default themes and deactivating any plugins you’re running, one at a time, to see if that resolves the issue?

    @anlino – Thanks for the suggestion Anders. I have tried deactivating each of the plugins I’m running, and activated the Twenty Nineteen theme. But the issue persists.

    Another thing that I forgot to mention previously is that I’m running multisite, and the issue exists in each site in the network.

    I too have the same problem whereby despite using jS F Y it refuses to display the “Textual Full” version of the month, instead of “December” I get “Dec”.

    I have reverted to a default theme and removed all plugins without success. I only noticed this today but am not sure if this happened with the upgrade to WordPress 5.0 or if it was prior to this and I just didn’t notice it.

    @daveoxton Are you also running multisite?

    I have experimented a bit with different format strings, with some interesting results, which may help with debugging.

    F outputs “Dec”

    FF outputs “DecDecember”

    But placing F after any other letter doesn’t have the same effect. For example:

    j F YF outputs “9 Dec 2018Dec”

    I also tried changing the code that outputs the date to <?php the_time('j F Y')); ?> — but this has the same problem.

    • This reply was modified 6 months, 2 weeks ago by  duncanstephen.

    @anlino No I am not running multisite.

    Have just been experimenting with WordPress to try to solve this problem and have noticed that if the Site Language is set to English (UK) then the problem persists. However, if I change it to English (United States) then this solves the problem – jS F Y gives me December as it should.

    @daveoxton – Excellent detective work. I can confirm that after changing the Site Language to English (United States), the date format displays correctly for me as well.

    @daveoxton @duncanstephen Awesome. I’ve asked the people in the #polyglots (localization) Slack channel to take a look at it.

    @daveoxton @duncanstephen A translation update should become available in the Dashboard → Updates screen within two hours, and installing it should fix the issue. Thanks for reporting it!

    @anlino – Many thanks for all your help. I have now updated the translation and the issue is now fixed for me.

    All fixed here too – many thanks one & all!!

    Did you guys check other languages?
    The problem persists in Italian.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Date format not displaying correctly’ is closed to new replies.