I'm new to php. I was able to get the time but the problem is it's in different time zone. What I want is to get the time in my timezone. Here's my code:
<?php
date_default_timezone_set('UTC+8');
$mydate=date('h:i A');
?>
The codes above gives me the wrong time, my timezone is UTC+8. Example my time is 9:00PM, but the codes above returns 1:00PM. How could I fix this? Any help would be so much appreciated.
UPDATE: I got it working now (thanks to @enenen). My new code that returns the correct timezone in my area:
<?php
date_default_timezone_set('Asia/Manila');
$mydate=date('h:i A');
?>