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

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -