In this article, you will learn how to get information about the location from the timezone. The PHP Examples of the TIMEZONE_LOCATION_GET() method returns information about the location from the given timezone.
What is the syntax of the TIMEZONE_LOCATION_GET() function in PHP?
timezone_location_get(object)
Examples of the TIMEZONE_LOCATION_GET() function
Parameter | Description |
---|---|
object | DateTime object created by timezone_open() method – Required |
Example 1. In this example, you will learn how to get information about the location from the given timezone.
<?php
$timezone=timezone_open("Asia/Taipei");
print_r(timezone_location_get($timezone));
?>