This article will teach important and common problems related to PHP date and time functions. Learning these solutions will help speed up PHP programming and improve logic while working with date and time functions.
I’m in Melbourne, Australia so I have something like this:
Or another example is LA – US:
You can also see what timezone the server is currently in via:
So something like:
$timezone = date_default_timezone_get(); echo "The current server timezone is: " . $timezone;
So the short answer to the question would be:
// Change the line below to your timezone! date_default_timezone_set('Australia/Melbourne'); $date = date('m/d/Y h:i:s a', time());
Then all the times would be to the timezone you just set.