Giới thiệu
Hàm timezone_name_get() trả về tên identifier của múi giờ từ đối tượng DateTimeZone.
Cú pháp
timezone_name_get(DateTimeZone $object): string|false
Tham số
- object - Đối tượng
DateTimeZone.
Giá trị trả về
Trả về tên múi giờ (string) như Europe/Paris, Asia/Ho_Chi_Minh. Trả về false nếu lỗi.
Ví dụ
<?php
$res = timezone_open("Europe/Paris");
echo timezone_name_get($res);
?>
Kết quả:
Europe/Paris