Php Get All Timezone

[Solved] Php Get All Timezone | Php - Code Explorer | yomemimo.com
Question : php get date using timezone

Answered by : arrogant-ape-94gd8klhvmtj

<?php
$date = new DateTime("now", new DateTimeZone('America/New_York') );
echo $date->format('Y-m-d H:i:s');

Source : https://stackoverflow.com/questions/8006692/get-current-date-given-a-timezone-in-php | Last Update : Mon, 10 Aug 20

Question : php get timezone

Answered by : aashit-vyom

echo date_default_timezone_get(); //UTC
//Read more at https://www.php.net/manual/en/function.date-default-timezone-get.php

Source : https://www.php.net/manual/en/function.date-default-timezone-get.php | Last Update : Wed, 22 Jul 20

Question : how to get the list of available timezones in php

Answered by : gursewak-singh

//To Get the list of timezones available in php
//use the static function listIdentifiers() on DateTimeZone class
$list = DateTimeZone::listIdentifiers();
print_r($list)

Source : | Last Update : Sat, 02 May 20

Question : set timezone in php

Answered by : frail-falcon-9e9q8cqpjwm6

date_default_timezone_set('Asia/Kolkata);

Source : | Last Update : Mon, 29 Nov 21

Question : Php get all timezone

Answered by : md-hasanur-rahman-hasan

$tzlist = DateTimeZone::listIdentifiers(DateTimeZone::ALL);

Source : | Last Update : Wed, 16 Mar 22

Answers related to php get all timezone

Code Explorer Popular Question For Php