Source Code:
(back to article)
<?php // Create a new DateTime object with the current date and time $now = new DateTime(); // Get the timezone of the DateTime object $timezone = date_timezone_get($now); // Display the timezone name echo $timezone->getName();
Result:
Report an issue