WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Can't Edit Timestamp in WP 2.5! (14 posts)

  1. dae1126
    Member
    Posted 6 years ago #

    Just upgraded to 2.5, and now I can't edit the timestamp on my posts!

    I click on edit timestamp to change the time, but the timestamp reverts right back to when I originally published the post once I click save!

    Any suggestions?

  2. Monika
    Member
    Posted 6 years ago #

    I post because I have the same problem and need help

    thanks a lot

  3. Stevish
    Member
    Posted 6 years ago #

    I reproduced this on my site too... I had never tried before. I'm gonna take a peek in the trac and see if I can find any more info on this...

  4. Stevish
    Member
    Posted 6 years ago #

    MORE INFO!

    I think I've figured it out (and I'm thinking about reporting it in the trac).

    When you change only the minute field (like from 17:51 to 17:30) and nothing else, the timestamp is not edited. But if you change the hour, year, or day (I didn't check month), the timestamp IS edited. I think it was an oversight from when they removed the "Edit Timestamp" checkbox.

    So for you two, for now... if you need to change the minute only, change the hour first, and then change it back to the specific time you wanted. ie. if the current timestamp is 17:51 and you want it to be 17:30, first change it to 16:51, then change it to 17:30. It's messy, but until they get the coding fixed in core, it'll have to do.

  5. dae1126
    Member
    Posted 6 years ago #

    Thanks for the workaround.
    But I still hope they fix this issue quickly!

  6. Stevish
    Member
    Posted 6 years ago #

    One more... last post, I promise.

    I checked the code, and it is definitely wrong. There is a simple typo (mm instead of mn), which is causing this problem. I have posted it in the trac, and it should be fixed for WP 2.5.1.

    Thanks for posting this error! I hope my little workaround works for you for now.

  7. dae1126
    Member
    Posted 6 years ago #

    Is there any way for me to edit the code to fix the problem?

  8. Monika
    Member
    Posted 6 years ago #

    wp-admin/includes/post.php

    if (!isset( $_POST['ping_status'] ))
    $_POST['ping_status'] = 'closed';
    
    //foreach ( array ('aa', 'mm', 'jj', 'hh', 'mm') as $timeunit ) {
    foreach ( array ('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) {

    and

    wp-admin/includes/comment.php

    //foreach ( array ('aa', 'mm', 'jj', 'hh', 'mm') as $timeunit ) {
    foreach ( array ('aa', 'mm', 'jj', 'hh', 'mn') as $timeunit ) {
    if ( !empty( $_POST['hidden_' . $timeunit] ) && $_POST['hidden_' . $timeunit] != $_POST[$timeunit] ) {

    kindly regards

    Monika

  9. dae1126
    Member
    Posted 6 years ago #

    Worked like a charm,
    Thanks Monika!!!

  10. Robert Wetzlmayr, PHP-Programmierer
    Member
    Posted 6 years ago #

    Nice, thanks for discovering this rare occassion of a "fat fingered bug" spreading by copy and paste ;-)

  11. jimmiejo
    Member
    Posted 6 years ago #

    How and where would you edit post.php and comment.php for this fix to work?

    I see the comments you've added in but don't notice what you modified. :)

  12. jimmiejo
    Member
    Posted 6 years ago #

    Ignore my last comment. I see the mm -> mn switch. Couldn't find that at first. :)

  13. matt_rix
    Member
    Posted 6 years ago #

    Please tell me at which line to edit in both the lines. I am completely new to PHP and wordpress.

  14. nextgen08
    Member
    Posted 6 years ago #

    I'm not sure if this is the same problem or not, but my site resets the date for wordpress stats at 5pm. Is there a way to make it reset at a more reasonable time like 7am? I've tried changing the time on Word Press, but that doesn't seem to change anything except the times on my posts. It is really frustrating that I'm not getting an accurate account of my readership. Any help would be greatly appreciated. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.