gaza165 Posted June 1, 2009 Share Posted June 1, 2009 hello everyone my server shows the time as New Time: 12:47:48 but locally it shows it as New Time: 05:57:11 is there any reason for this, what can i do about i?? many thanks Garry Link to comment https://forums.phpfreaks.com/topic/160508-server-time-is-different-from-local-time/ Share on other sites More sharing options...
anupamsaha Posted June 1, 2009 Share Posted June 1, 2009 Are you refering the server as localhost or a remote server? Most probably, remote server located in different time zone than your time zone, will have different time as a result. Link to comment https://forums.phpfreaks.com/topic/160508-server-time-is-different-from-local-time/#findComment-847068 Share on other sites More sharing options...
gaza165 Posted June 1, 2009 Author Share Posted June 1, 2009 yeah how can i alter the timezone on my server to get it to the right time?? Link to comment https://forums.phpfreaks.com/topic/160508-server-time-is-different-from-local-time/#findComment-847070 Share on other sites More sharing options...
lonewolf217 Posted June 1, 2009 Share Posted June 1, 2009 there is a timezone flag for PHP's date() function http://us.php.net/manual/en/function.date.php Link to comment https://forums.phpfreaks.com/topic/160508-server-time-is-different-from-local-time/#findComment-847076 Share on other sites More sharing options...
xcoderx Posted June 1, 2009 Share Posted June 1, 2009 Or the simple way add ths line maybe in ur config.Php file putenv("TZ=asia/calcutta"); change asia/calcutta acording to ur country. Link to comment https://forums.phpfreaks.com/topic/160508-server-time-is-different-from-local-time/#findComment-847132 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.