Answers for "check current php timezone"

PHP
0

php get date using timezone

<?php
$date = new DateTime("now", new DateTimeZone('America/New_York') );
echo $date->format('Y-m-d H:i:s');
Posted by: Guest on August-03-2020
2

how to get the list of available timezones in php

//To Get the list of timezones available in php
//use the static function listIdentifiers() on DateTimeZone class
$list = DateTimeZone::listIdentifiers();
print_r($list)
Posted by: Guest on April-25-2020

Code answers related to "check current php timezone"

Browse Popular Code Answers by Language