I am making an application where I need to store th date in MySQL using the PHP date() function.
date()
You can do it easily just by the following two lines of PHP.
$tz = (new DateTime('now', new DateTimeZone('Asia/Kabul')))->format('P'); $pdo->exec("SET time_zone='$tz';");