Friday, March 28, 2014

Using php get GMT time by changing server timezone


<?php
date_default_timezone_set("UTC");
$timezone = date_default_timezone_get();
echo "Current server timezone: " . $timezone;
echo "<br/>Current server time: " . date("Y-m-d H:i:s", time());
?>

No comments:

Post a Comment