Php Get Your Time Zone

[Solved] Php Get Your Time Zone | 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 : 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 your time zone

Code Explorer Popular Question For Php