Hi All

php version no. 5.2.10

busy playing with drupal 7 on a test server

setup the date 7.x-1.x-dev and the calendar 7.x-1.x-dev modules

when i go to the month view on a browser i get the following errors, if i go to the view option and do a preview i do not the errors, below the errors the calendar views as normal displaying the information as required

•Warning: DateTime::getTimezone() [datetime.gettimezone]: The DateTime object has not been correctly initialized by its constructor in DateObject->__construct() (line 161 of /var/www/html/paul-d7/sites/all/modules/date/date_api.module).
•Warning: DateTime::format() [datetime.format]: The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 229 of /var/www/html/paul-d7/sites/all/modules/date/date_api.module).
•Warning: DateTime::format() [datetime.format]: The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 229 of /var/www/html/paul-d7/sites/all/modules/date/date_api.module).
•Warning: DateTime::format() [datetime.format]: The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 229 of /var/www/html/paul-d7/sites/all/modules/date/date_api.module).

check http://jay.ictgateshead.org/paul-d7/calendar

the error carrys on with different line numbers

thanks for any help

Paul

Comments

sven.lauer’s picture

I have the same issue, with the latest -dev version of Date / D7.0 / PHP 5.3.5.

robboten’s picture

Same here, can't use drupal 7 cuz I need this config to make events on site. Any fix?

sven.lauer’s picture

Status: Active » Closed (fixed)

This seems to have been fixed with the current release.

rsgracey’s picture

I'm suddenly getting these errors, so it's not been fixed. Anyone else?

Warning: DateTime::getTimezone(): The DateTime object has not been correctly initialized by its constructor in DateObject->__construct() (line 273 of /data1/project01/drupal/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 365 of /data1/project01/drupal/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 365 of /data1/project01/drupal/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 365 of /data1/project01/drupal/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 365 of /data1/project01/drupal/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 365 of /data1/project01/drupal/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 365 of /data1/project01/drupal/sites/all/modules/date/date_api/date_api.module).
Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in DateObject->format() (line 365 of /data1/project01/drupal/sites/all/modules/date/date_api/date_api.module).
ndrosev’s picture

I have the same issue , can somebody help me to fix it ?

ndrosev’s picture

I fixed the problem for me , the issue comes from the incorrect syntax of parameters in DateObject Class
$time_start_obj = new DateObject(reset($start_times), 'UTC'); - incorrect
$time_start_obj = new DateObject(reset($start_times), 'UTC', DATE_FORMAT_DATETIME); -correct
Just set the format of DateObject
I hope this will help someone