If you need to get a time that’s adjusted for the site’s timezone setting in the admin area, use:
$timezone = new DateTimeZone( 'Asia/Singapore' ); wp_date("d-m-Y H:i:s", null, $timezone );
Please don’t use
date_default_timezone_set(). The timezone in PHP needs to stay GMT+0 as that’s what WordPress expects it to be. Several features are dependent on this, and will break if you adjust the timezone.
current_time( 'timestamp' ) is no longer recommended since WordPress 5.3.
For more tips on timezones, visit the excellent Date/Time improvements post!