Kerm Posted February 2, 2012 Share Posted February 2, 2012 Hello, I have some bug in my BO, any date are not displayed... New order or new customer etc. date fields is empty, some1 know why? Link to comment Share on other sites More sharing options...
Ronaldo Perez Posted February 2, 2012 Share Posted February 2, 2012 In default install - all dates show. You set Time Zone in preferences? Link to comment Share on other sites More sharing options...
Kerm Posted February 14, 2012 Author Share Posted February 14, 2012 Europe/Moscow Btw it's not clean install, first it was 1.4...after i three times upgrade my shop, now it's 1.4.7.0 and still i see same problem here... I turn on debug mode and see this errors where date must be: Notice: Undefined index: date_format_full in /var/www/user/data/www/bikinimal.ru/classes/Tools.php on line 495 Link to comment Share on other sites More sharing options...
Kerm Posted February 14, 2012 Author Share Posted February 14, 2012 I fix that problem using code from old tools.php file, i change this: public static function displayDate($date, $id_lang, $full = false, $separator = '-') { if (!$date OR !($time = strtotime($date))) return $date; if (!Validate::isDate($date) OR !Validate::isBool($full)) die (self::displayError('Invalid date')); $language = Language::getLanguage((int)$id_lang); return date($full ? $language['date_format_full'] : $language['date_format_lite'], $time); } /** * Sanitize a string * * @param string $string String to sanitize * @param boolean $full String contains HTML or not (optional) * @return string Sanitized string */ public static function safeOutput($string, $html = false) { if (!$html) $string = strip_tags($string); return @Tools::htmlentitiesUTF8($string, ENT_QUOTES); } On this: public static function displayDate($date, $id_lang, $full = false, $separator = '-') { if (!$date OR !strtotime($date)) return $date; if (!Validate::isDate($date) OR !Validate::isBool($full)) die (self::displayError('Invalid date')); $tmpTab = explode($separator, substr($date, 0, 10)); $hour = ' '.substr($date, -8); $language = Language::getLanguage((int)($id_lang)); if ($language AND strtolower($language['iso_code']) == 'fr') return ($tmpTab[2].'-'.$tmpTab[1].'-'.$tmpTab[0].($full ? $hour : '')); else return ($tmpTab[0].'-'.$tmpTab[1].'-'.$tmpTab[2].($full ? $hour : '')); } /** * Sanitize a string * * @param string $string String to sanitize * @param boolean $full String contains HTML or not (optional) * @return string Sanitized string */ public static function safeOutput($string, $html = false) { if (!$html) $string = @htmlentities(strip_tags($string), ENT_QUOTES, 'utf-8'); return $string; } And now all ok..i see dates, who know why this problem happen? Link to comment Share on other sites More sharing options...
Recommended Posts