shahzad429 Posted February 26, 2012 Share Posted February 26, 2012 I am trying to display date and time below code display date correctly but when it come to display time it display 3 hour behind. eg. when it is 12:47 PM in my system it display 9:47 PM <?php $todaydate=date("j - F - Y g:i:s a"); echo $todaydate; ?> Link to comment https://forums.phpfreaks.com/topic/257809-time-3-hour-behind/ Share on other sites More sharing options...
joel24 Posted February 26, 2012 Share Posted February 26, 2012 you need to set PHP's timezone; http://php.net/manual/en/function.date-default-timezone-set.php Link to comment https://forums.phpfreaks.com/topic/257809-time-3-hour-behind/#findComment-1321377 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.