Support » Fixing WordPress » Date/time formatting error

  • Resolved aaronh


    When I call the_date() or the_time() with string arguments they return a {1} in front of the string. When I call those functions with numeric arguments they return fine.

    For example:

    the_date(‘l, F j, Y’) returns {1}Saturday,${1}July 2, 2006
    the_date(‘F j, Y’) returns {1}July 2, 2006

    On the other hand, numeric (and am/pm) arguments are no problem:

    the_date(‘g:i a’) returns 11.14 am
    the_date(‘m.j.y’) returns 07.1.02

    as they should.

    Calling the_time() with the same arguments produces the same results.

    Any help would be appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • It has to do with and old version of PHP in combination with a change they made in WordPress 2.0.3.

    They fixed it in the yet to be released 2.0.4 version, but take a look at this topic for some workarounds in the meantime.

    Modifying the mysql2date() call, as recommended in the topic you referenced, fixed the problem. Apologies for reposting; somehow my search missed the original topic.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Date/time formatting error’ is closed to new replies.