--------------------- PHP timezones example written by Simon Hutchison - http://www.econfirm.com.au/ --------------------- date_default_timezone_set("Australia/Sydney") Sun, 02 Mar 2008 14:57:11 +1100 date_default_timezone_set("Australia/Perth") Sun, 02 Mar 2008 12:57:11 +0900 --------------------- The comments in this example assumes server is Sydney time. --------------------- Demonstrating that timezone is not important for mktime(), date("U") and time(). Get GMT 0. Uses the server time to adjust to GMT 0 so need to ensure server time is correct for these functions to be accurate. date_default_timezone_set("Australia/Perth") mktime() : 1204430231 date("u") : 1204430231 time() : 1204430231 date_default_timezone_set("Australia/Sydney") mktime() : 1204430231 date("u") : 1204430231 time() : 1204430231 --------------------- Now that we know this we can use these functions to compare to other GMT 0 adjuste...
Comments
Mandriva 2009.0