I am trying to get the local time using php. I wrote two different versions, but they both give the wrong time
date_default_timezone_set(\'UTC\'); $now = new Dat
Simply use function date_default_timezone_set(). Here is example:
<?php date_default_timezone_set("Asia/Dhaka"); echo date('d-m-Y h:i:s A'); ?>
Hope it will help, Thanks.