i tried this but its a php5 function...any ways around? cause else the times on my site dont match![]()
i tried this but its a php5 function...any ways around? cause else the times on my site dont match![]()
Maybe something like:
I'm not sure if that will work, or what the string is for timezones. The appendix page says:PHP Code:ini_set('date.timezone', '[Timezone Here]');
Originally Posted by http://us3.php.net/manual/en/ref.datetime.php#ini.date.timezone
rock on thanx a lot ;)
ok this doesn't seem to be working :s i can use this in php right?
right befor i do this?
$date = date("Y-m-d G:i");
That will return the date/time in the format between the "'s. I'm not sure, like I said in my orginal post if the ini_set() will set the date.timezone to the correct timezone, as I have not tested it myself. If you call that date() function like you posted AFTER you used the ini_set() function, (And ini_set() did successfully change the timezone), then your date() function should return the date/time in the timezone you set. If ini_set() did not work, your date/time will be returned in the CST (GMT -6) timezone.PHP Code:$date = date("Y-m-d G:i");
You can check the return value from ini_set() to see what it returns. I believe if the function successfully changed the configuration value it will return the old value, and if it didn't, false. So if it "works", you can get the format of teh old timezone in the configuration file and see what the GMT timezone format should be.
ok i got it working put inv(TZ=Europe/belgium) or something like that ...dont have the code open atm
but the one u gave works for php version 5 and higher but we have 4.xxx
"date.timezone "" PHP_INI_ALL Available since PHP 5.1.0."
My bad, I didn't see that.. :-/