Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Not sure why this would happen – this is the code:

    human_time_diff( get_the_time( 'U' ), current_time( 'timestamp' ) ) . ' ' . __( 'ago', 'job_manager' )

    get_the_time should return the publish date.

    Thread Starter Sébastien Dumont

    (@sebd86)

    I just gone to the job post again on my site. Now it is showing it correctly. It says posted 2 weeks ago. I have not made any modifications to the plugin, WordPress or job post.

    It just decided to change from 2 days ago to 2 weeks ago.

    Could this be a miss-calculation in WordPress it’s self of version 3.6 ?

    I will check again in a few hours to see if it stays the same now or not.

    Hi “Plugin Author”,

    having a similar problem. Posted a job some minutes ago and it shows me as the posted date “44 years ago (44 Jahre her)”…. a bug! Tried it with a new posting a minute ago and it also shows 44 years ago.

    Check http://www.hitradio.com.na/uber-uns/jobs/

    Any solution?

    Best regards
    Christian

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    @chtrede whats the post date when you edit the listing? And if thats wrong, did you submit the listing, or manually post it.

    Hi mikejolley,

    the edit date is the correct date and time.
    I manually posted it from backend.

    Regards
    Christian

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    I’m not sure what to suggest – I don’t see this happening for other users so it would have to be a plugin or theme affecting it. We use the standard get_the_time() function which should return correctly for the current post.

    Perhaps turn off themes and plugins, then turn them on until the issue occurs so you know whats doing it.

    Hi there,

    tried it, makes no difference with all plugins deactivated and even with another theme. Do not have any date issues with any other plugin.

    Could you then maybe just point me to the correct file and which lines to delete so that no date/time at all is shown!

    Many thanks
    Christian

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    here: https://github.com/mikejolley/WP-Job-Manager/blob/master/templates/content-job_listing.php#L16

    Maybe you could debug that too:

    <?php
    global $post;
    var_dump( $post->post_date );
    var_dump( get_the_time( 'U' ) );
    var_dump( date( 'Y-m-d', get_the_time( 'U' ) ) );
    var_dump( date( 'Y-m-d', current_time( 'timestamp' ) ) );
    ?>

    That will output some data from the post – see which is output correctly/incorrectly 🙂

    Hi there,

    in wp-job-manager/templates/content-job_listing.php
    the mentioned code does not exist.

    all that related there to a date is
    <li class="date"><date><?php echo human_time_diff( get_the_time( 'U' ), current_time( 'timestamp' ) ) . ' ' . __( 'ago', 'job_manager' ); ?></date></li>

    Regards
    Christian

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    @chtrede I know it doesn’t exist, I was suggesting that you add it to see which date is being pulled incorrectly.

    Ok, do not know how to debug or so, as I am not a computer expert at all. Thought there is a way to get rid of the wrong time/date…

    Anyways, will use another lugin then.

    Thanks
    Christian

    Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    Removing the list element would have sufficed.

    Of course, doing debug as I suggested (pasting the code, seeing what is output, then removing the code again) would have helped reveal the issue *that is specific to your site* but suit yourself.

    Thanks

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How many days ago is incorrect’ is closed to new replies.