php change timezone
snippet in php

php default timezone

user9566

date_default_timezone_set("Asia/Kolkata");
// List of Supported Timezones https://www.php.net/manual/en/timezones.php

php change timezone

user7152

date_default_timezone_set('America/Los_Angeles');

php current datettime us time zone

user766

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

change timezone in php

user3383


date_default_timezone_set(timezone)

change timezone in php

user7244

 date_default_timezone_set("Asia/Bangkok");
echo date_default_timezone_get();