Example 1 — Getting the Name of a Zone
Create a zone for Tokyo and read its name.
<?php
$tz = timezone_open('Asia/Tokyo');
echo timezone_name_get($tz), PHP_EOL; How It Works
- timezone_open() creates a DateTimeZone object for Asia/Tokyo.
- timezone_name_get() reads the name back from the object.
- The result is the same identifier that was used to create the zone.

