Featured templates

Joomla Framework. Troubleshooter. Warning: Invalid CRT parameters detected

Chris Diaz January 9, 2012
No votes yet.
Please wait...

Installing Gantry Framework and Joomla template on local server (WAMP) on Windows 7 you can see the following error:

Warning: Invalid CRT parameters detected in …joomla\libraries\gantry\core\utilities\gantrydate.class.php on line 242

This is caused by the CRT values used which are not compatible with Windows.

To resolve it open Joomla installation directory and edit “ibraries\gantry\core\utilities\gantrydate.class.php” file
on line 242 before

	1date  = strftime(1format, 1time);
	return 1date;


  if(PHP_OS == 'WINNT'){
  $format =  str_replace("%h", "%b", $format);
  $format =  str_replace("%e", "%#d", $format);

as a result you should have

   function _strftime($format,  $time)
    if(strpos($format, '%a') !== false)
     $format = str_replace('%a',  $this->_dayToString(date('w', $time), true), $format);
    if(strpos($format, '%A') !== false)
     $format = str_replace('%A', $this->_dayToString(date('w',  $time)), $format);
    if(strpos($format, '%b') !== false)
     $format = str_replace('%b',  $this->_monthToString(date('n', $time), true), $format);
    if(strpos($format, '%B') !== false)
     $format = str_replace('%B',  $this->_monthToString(date('n', $time)), $format);
    if(PHP_OS == 'WINNT'){
     $format = str_replace("%h", "%b",  $format);
     $format = str_replace("%e", "%#d",  $format);
   $date  = strftime($format, $time);
   return  $date;

Joomla Themes
This entry was posted in Joomla! Tutorials and tagged archived_tutorial, CRT, framework, gantry, Joomla. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket