Viewing 1 replies (of 1 total)
  • @zatore this plugin works fine if your WP date format is m/d/Y

    in my case date format is j F Y (italian language)
    I added

    	
    function yith_countdown_unixstamp( $date ) {    	
    		if ($date['date']) {
    			list($dd, $mm, $yy) = explode(' ', $date['date']);
    
    			$months = array(
    				'gennaio' 	=> '01', 
    				'febbraio' 	=> '02', 
    				'marzo' 	=> '03', 
    				'aprile' 	=> '04', 
    				'maggio' 	=> '05', 
    				'giugno' 	=> '06', 
    				'luglio' 	=> '07', 
    				'agosto' 	=> '08', 
    				'settembre' => '09', 
    				'ottobre' 	=> '10', 
    				'novembre' 	=> '11', 
    				'dicembre' 	=> '12', 
    				);
    			$mm = $months[$mm];			
    		}
    
    	    $h = $date['hh'];
    	    $m = $date['mm'];
    	    $s = $date['ss'];
    
    	    return mktime( (int) $h, (int) $m, (int) $s, (int) $mm, (int) $dd, (int) $yy );
    	}
    

    in the init.php plugin’s file before it require: require_once(‘functions.yith-tcountdown.php’);

    this override the original plugin function.
    Not elegant, but works for me

Viewing 1 replies (of 1 total)
  • The topic ‘Time not displayed properly’ is closed to new replies.