when I call Date("H")
<?php echo Date("H"); ?>
it displays 01 but the current time is 9:45 AM, its supposed to display 09 right?
output:
current time :
I tried to restart service and also restart the computer but its still 01
when I call Date("H")
<?php echo Date("H"); ?>
it displays 01 but the current time is 9:45 AM, its supposed to display 09 right?
output:
current time :
I tried to restart service and also restart the computer but its still 01
Probably your timezone is wrong, try to set this before your code:
date_default_timezone_set('America/Fortaleza');
Change 'America/Fortaleza' to your timezone.
You can set it in php.ini too:
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = "America/Fortaleza"