Support » Plugin: AdRotate Banner Manager » Date stuck at 1970 is still unresolved

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Arnan de Gans


    And the issue was resolved in the current version.

    After installing that update, did you click the “finish update” button in your dashboard when prompted?
    If you did, please check your servers error_log file for anything mentioning AdRotate – Anything is interesting.



    Hi Arnan

    We fixed this by patching the code. All hooks to from the date and plugin where missing.

    If anyone needs this fix, please contact me.

    Plugin Author Arnan de Gans


    What hooks? Please get in touch –

    Here is the code for the fix:

    LINE 269
    $wpdb->insert($wpdb->prefix.’adrotate_schedule’, array(‘name’ => ‘Schedule’, ‘starttime’ => $startdate, ‘stoptime’ => $enddate, ‘maxclicks’ => $maxclicks, ‘maximpressions’ => $maxshown));
    $sc_id = $wpdb->insert_id;
    $wpdb->update($wpdb->prefix.’adrotate_schedule’, array(‘name’ => ‘Schedule ‘.$sc_id), array(‘id’ => $sc_id));
    $lmeta=$wpdb->get_row(‘SELECT * FROM ‘.$wpdb->prefix.’adrotate_linkmeta WHERE ad = ‘.$id, ARRAY_A);
    if($lmeta === NULL){
    $wpdb->insert($wpdb->prefix.’adrotate_linkmeta’, array(‘ad’ => $id, ‘group’ => ”, ‘user’ => ”, ‘schedule’ => $sc_id));
    $wpdb->update($wpdb->prefix.’adrotate_linkmeta’, array(‘schedule’ => $sc_id), array(‘ad’ => $id));

    Line 283

    I’m still having this issue.

    By the way, i was never prompted to finish update, in fact, i just reinstalled it and i’m still seeing this bug.

    What else can we do?

    I received an update yesterday, it’s v4.7 by now and still, we have this issue. Date is stuck at Jan 1, 1970 and not able to be changed.

    @akerfeldt use the code we have published above to fix it. There is no other way and do not update afterwards as you will wipe out the fix.

    I had the same problem and took the nuclear option

    I saved my most important stats, deleted the plugin and installed a new one then recreated all my ads…

    A bit laborious but it works…!

    @mister_russ just use the code we have left on this entry (see above) and it will fix it. No need to delete and reinstall.

    Thanks, but I’m not that comfortable with code…
    Anyway, it was good to get rid of some old ads.

    @cognisant_2000 is this fix perhaps for line 296? I assume in adrotate.php? Looks like it fist better there with the date related info

    @quickonline Hi. That is correct. The error is in the plugin itself and not a WordPress issue, but beware that everytime you upgrade the plugin, you need to check if they have fixed the issue and if not, you have to reapply this code again!!

    To our knowledge this fix has not been implemented so at the moment you have to reapply after an upgrade.

    Thanks @cognisant_2000 – I’m just wondering about the location, perhaps this file changed in a later version – below is lines 257 – 283 in this installation’s adrotate.php file.

    	    if ($view == "" OR $view == "manage") {
    			// Show list of errorous ads if any			
    			if ($error) {
    			// Show disabled ads, if any
    			if ($disabled) {
    		} else if($view == "addnew" OR $view == "edit") { 
    	   	} else if($view == "generator") { 
    		<br class="clear" />
    		<?php echo adrotate_trademark(); ?>

    Same problem. Not comfortable with editing code.

    Is there any other resolution?

    Is this possible a permissions issue with the database?


    I am the same, ie not comfortable with editing code.
    Simple solution is to save your stats, delete the plug in completely and install the latest version and recreate your ads…

    All works perfectly and not a single line of code to change !

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Date stuck at 1970 is still unresolved’ is closed to new replies.