Viewing 1 replies (of 1 total)
  • Thread Starter eric852

    (@eric852)

    Hello again.
    I have to add that i am free.fr user and free use php 5.1 which do not have DateTime class.
    What i dont understand is that this class was used in previous versions of customizr without visible error.
    I found this code to emulate this class :
    ——————————-

    [ Moderator note: code fixed. Please wrap code in the backtick character or use the code button. ]

    if (!class_exists('DateTime')) {
    class DateTime {
    public $date;
    
    public function __construct($date) {
    $this->date = strtotime($date);
    }
    
    public function setTimeZone($timezone) {
    return;
    }
    
    private function __getDate() {
    return date(DATE_ATOM, $this->date);
    }
    
    public function modify($multiplier) {
    $this->date = strtotime($this->__getDate() . ' ' . $multiplier);
    }
    
    public function format($format) {
    return date($format, $this->date);
    }
    }
    }

    ————————
    But where should i put it ? In customizr-child/functions.php ?
    Thanks

Viewing 1 replies (of 1 total)
  • The topic ‘Problem wich HTML 5 search on 3.2.5’ is closed to new replies.