CodeIgniter Forums
date - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter Archived (from EllisLab) (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: date (/thread-44100.html)



date - El Forum - 08-03-2011

[eluser]Unknown[/eluser]
A PHP Error was encountered

Severity: Warning

Message: date(): 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/Paris' for '2.0/DST' instead

Filename: models/member.php

Line Number: 41

----------------------------------------------
This is a real bugger in my code, it pops up with everything i do, i changed the timezone.ini in the config, added the changes in the index.php but then i get a 500 internal error back, this sucks!!

How can i fix this ????


date - El Forum - 08-03-2011

[eluser]oldrock[/eluser]
Hi ,

i am not clear , please can you post your code here so that it will be easy to fix your issue.


thanks


date - El Forum - 08-03-2011

[eluser]danmontgomery[/eluser]
timezone.ini?

set date.timezone in php.ini:

Code:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Europe/Paris

Then restart apache. See http://php.net/manual/en/timezones.php for a list of valid timezones

Or, at the top of index.php, include:

Code:
date_default_timezone_set('Europe/Paris');