Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php datetime set timezone

$date = new DateTime();
$date->setTimezone(new DateTimeZone('+0800')); //GMT
echo $date->format('Y-m-d H:i:s');
// 2020-11-20 15:23:49
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #datetime #set #timezone
ADD COMMENT
Topic
Name
5+1 =