Wordpress Tip: Change Scheduled Post Date Information

Wordpress 2.7 is a whole lot of good. Snappier and (to me) better designed UI. However, there is one aspect of the UI that has a few irritated (perhaps irriated is too strong a word). Not a critical thing, but still something they’d like changed. What is the issue? When looking at the publish date for future/scheduled posts, instead of the normal date on when it will be shown (e.g. 2009/1/25) the user is presented with how many days from the current date the post will be published (e.g. 37 days from now).

Future Posts - Days From Now

So, I’ve taken a gander and came up with the following solution. It may not be the best (and for anyone sketchy about editing code, a little concerning), but it’s fast and easy.

There are two lines in wp-admin/includes/template.php that effect the date display. If you have any text editing/coding program, you should be able to go to the lines 1342 and 1552. If anything, a search for “$h_time = sprintf( __(’%s from now’), human_time_diff( $time ) );” (without quotes) will do the trick. Now, you can replace that exact text with “$h_time = mysql2date(__(’Y/m/d’), $m_time);” (without quotes) and that’s it! Save and upload the modified file. If you’re sketchy about replacing the line, you can comment it out as I did.

Future Posts - code edit line 1341line 1341

Future Posts - code edit line 1552
line 1552

And once you’re done and uploaded, you can see your results when you refresh the page.

Future Posts - Date

If you would like to put the “from now” information on the tooltip when hovering your mouse cursor over the date, you can add the code chunk in the screenshot below to line 1361.

Future Posts - code edit line 1361
line 1361

6 Responses to “Wordpress Tip: Change Scheduled Post Date Information”

  1. Posts about Wordpress 2.7 as of December 19, 2008 | The Lessnau Lounge says:

    [...] post about WordPress 2.7) that actually turned out to be not what I expected. My motherboard Wordpress Tip: Change Scheduled Post Date Information – zuruzuru.org 12/19/2008 Wordpress Tip: Change Scheduled Post Date Information Wordpress 2.7 is a [...]

  2. Webomatica says:

    Sweet, this worked! Thanks a ton.

  3. Arlan says:

    No problem, glad to be helpful!

  4. David Bradley says:

    Nice fix! This should be a toggle switch in Wordpress, I expect a lot of people have complained about the “days from now” and want to revert.

  5. Arlan says:

    Thanks! Yeah, it’s a bit weird and I would imagine it might get modified, officially, in the future.

  6. Wordpress, X Days from Now | it-techinfo.com says:

    [...] to ZuruZuru for this hack. Hopefully, the next version of Wordpress will have this tweak available as either a [...]

Post a Comment