• I am unable to display a custom date using date_i18n

    It will only display the date and time of now.

    For example, I have a date of 2013-07-29 15:07:25 but I get 2013-07-30 15:37:06

    $date = '2013-07-29 15:07:25'
    echo date_i18n('D j M, Y g:i:s a', strtotime($date))

    If I was to do date_i18n('D j M, Y g:i:s a', strtotime($post->post_date)) it would work fine but not a custom date from let’s say a post meta value.

    Any help to get this working or show what I am doing wrong would be most appreciated.

    Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom date not showing correctly when using date_i18n’ is closed to new replies.