Why does 24 hours format not working after time zone set in php? -
when setting timezone using date_default_timezone_set()
,
date("h:i")
not able convert time in 24-hour format
i had tried
$curdate = date("g:i a"); echo $curdate;
output
17:41 pm // current time of host's server
but after setting timezone, unable convert it.
date_default_timezone_set("asia/kolkata"); $curdate = date("g:i a"); echo $curdate;
output
3:09 // current time in india
what reason behind , how can current time in 24-hour format after setting timezone
thanks in advance
Comments
Post a Comment