WordPress get time

Arun - 27/03/2020 5:04 PM

Files 1

file.php
php
<?php
echo get_option('gmt_offset'); //get timezone set from wordpress dashboard
$get_current_time = date( 'Y-m-d H:i:s', current_time( 'timestamp', 0 ));
echo $get_current_time;