1 (edited by FionaCEDaR 22-05-2014 14:57:50)

Topic: DateTime error

Hi,

I'm getting a DateTime error on my site and I'm totally at a loss to know where to fix this. Help please!!!!

DateTime::__construct() [datetime.--construct]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/London' for 'BST/1.0/DST' instead

It appears on the My Records report and shows when I try to edit a record.

Cheers,
Fiona

Fiona McCrory
CEDaR Website Officer
www.nmni.com/cedar

2

Re: DateTime error

Hi Fiona
I think you need to set your timezone for your php.ini file (probably as a result of a PHP version upgrade on the server?). Something like the following needs to appear in your ini file I think:

date.timezone = "Europe/London"

Cheers
John

John van Breda
Biodiverse IT

3

Re: DateTime error

Thanks John,
I've deleted the php.ini file which I had created (without knowing the true extent of my actions) for another change I wanted to make. This has been a knock on effect so I've now deleted the php.ini file and everything is back to normal. Phew!

The perils of shared hosting and a little knowledge not being quite enough!!!

Fiona

Fiona McCrory
CEDaR Website Officer
www.nmni.com/cedar