Solved it as I was saving this message I thought that perhaps the order in the script is not correct, changed that and all okay, sorry for using up space.
// set the default timezone to use. Available since PHP 5.1
date_default_timezone_set('Europe/Brussels');
// Prints something like: Monday
echo date("Y");
Hi I am using a little script to get the current date. It however gives me an error in system event.
Here is the error:
date() [function.date]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Berlin' for 'CEST/2.0/DST' instead
Now this is the script I am using and all seems okay to me so I dont get it really.
Any suggestions?
<?php
// Prints something like: Monday
echo date("Y");
// set the default timezone to use. Available since PHP 5.1
date_default_timezone_set('Europe/Brussels');
// Prints something like: Monday
//echo date("l");
// Prints something like: Monday 8th of August 2005 03:12:46 PM
//echo date('l jS \of F Y h:i:s A');
// Prints: July 1, 2000 is on a Saturday
//echo "July 1, 2000 is on a " . date("l", mktime(0, 0, 0, 7, 1, 2000));
/* use the constants in the format parameter */
// prints something like: Mon, 15 Aug 2005 15:12:46 UTC
//echo date(DATE_RFC822);
// prints something like: 2000-07-01T00:00:00+00:00
//echo date(DATE_ATOM, mktime(0, 0, 0, 7, 1, 2000));
?>