How do I subtract from getdate()
Posted: Fri Feb 17, 2006 1:45 pm
I am working in CST and my website is for this timezone. I am using the the function getdate() to make a current date to test database dates against.
My problem: the date I receive from getdate() is two hours ahead of CST. Can someone help me understand how to subtract two hours? My code for the variable looks like this:
I read there is a function "date_default_timezone_set()" but I am not running php5 so I cannot utilize it. Is there a way to get this function working? (I don't have control over the webserver so I cannot actually load a new version of php but I have read of something called "php_compat". Any help would be appreciated. Thanks
Ross
My problem: the date I receive from getdate() is two hours ahead of CST. Can someone help me understand how to subtract two hours? My code for the variable looks like this:
Code: Select all
$curDate = date('Y-m-d', mktime(getdate()));Ross