Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

500 - DateTime::__construct()
(1 viewing) (1) Guest
Universal booking and reservations component for Joomla!.

NOTE: This category has been locked. If you have purchased paid version, please, use our Support Ticket system instead. If you are using free edition, please see the Community Support section.

TOPIC: 500 - DateTime::__construct()

500 - DateTime::__construct() 12 years ago #35126

Hello
when I want to set a monthly calendar, so I get the error

500 - DateTime::__construct() [datetime.--construct]: Failed to parse time string (first day of + 0 month) at position 10 (o): The timezone could not be found in the database

my version php is 5.2.17-pl0-gentoo

can someone help me
The topic has been locked.

Re: 500 - DateTime::__construct() 12 years ago #35147

I am getting the same error:

500 - DateTime::__construct() [datetime.--construct]: Failed to parse time string (first day of + 0 month) at position 10 (o): The timezone could not be found in the database

This was after running the most recent update. Now running 1.5.2

Really need this fixed ASAP!

Any help is appreciated.

Thanks
The topic has been locked.

Re: 500 - DateTime::__construct() 12 years ago #35149

Found the fix for my server. It is a PHP error. When updating to 1.5.2 make sure you are running PHP 5.3+. On my .htaccess file I added:

AddType application/x-httpd-php53 .php

and all works fine now.

Hope that helps!

Matt
The topic has been locked.

Re: 500 - DateTime::__construct() 12 years ago #35151

Unfortunately still does not work. I have only php 5.2.
Does anyone have any instructions which would go to remove this error.
The topic has been locked.

Re: 500 - DateTime::__construct() 12 years ago #35174

  • maju
  • OFFLINE
  • Posts: 1107
Hello,

there is more our customers using older version of php. But how wrote mattd, with php 5.3+ it should be repaired.
But we have prepared modification which should be available in newer versions of booking and should work in php 5.2.

Go to administrator/components/com_booking/helpers/html.php and around line 618 should start method getMonthsSelect.

Modify it to this code:
 
/**
* Get months select for quick navigator.
*
* @param string $name name of HTML select box
* @param int $selectedMonth selected month from user request
* @param int $selectedYear selected year from user request
* @param int $deep set calendar available deepth
* @param string $attribs custom HTML tag params
* @return string HTML
*/

function getMonthsSelect($name, $selectedMonth, $selectedYear, $deep, $attribs = '')
{
$arr = array();
 
$date = JFactory::getDate();
 
$m = $date->toFormat('%m');
$y = $date->toFormat('%Y');
 
for ($i = 0; $i <= $deep; $i ++) {
$date = JFactory::getDate("$y-$m-01 + $i month");
/* @var $date JDate */
$arr[] = JHTML::_('select.option', ((int) $date->toFormat('%m') . ',' . (int) $date->toFormat('%Y')), ($date->toFormat('%B') . '/' . $date->toFormat('%Y')));
}
return JHTML::_('select.genericlist', $arr, $name, $attribs, 'value', 'text', $selectedMonth . ',' . $selectedYear);
}
 
ARTIO Support Team
Last Edit: 12 years ago by maju.
The topic has been locked.

Re: 500 - DateTime::__construct() 12 years ago #35177

thank you for the advice, but when i changed the code web page doesn´t work.
I have error on line, where is for cycle.
The topic has been locked.
User Login Empty