php get current datetime mysql format
snippet in php

php get current datetime

Noob codes official

//set default timezone
date_default_timezone_set("Asia/Calcutta");

$currentDateTime = date('Y-m-d H:i:s');
echo $currentDateTime;

//output
//2020-02-17 09:02:15

php get current datetime mysql format

user6873

date('Y-m-d H:i:s');

php get current datetime in us chicago

user1303

$dt = new DateTime('now', new DateTimezone('America/Chicago'));
$dt->format('Y-m-d H:i:s')