UI-ZEIKVK Posted November 2, 2007 Share Posted November 2, 2007 Hi i need some help on getting right time value. My server is located in singapre, and i need to get the US time as the sever time... How can i do this.. is there a way to do this with php. Please help! Link to comment https://forums.phpfreaks.com/topic/75744-need-some-help-on-getting-right-time-value/ Share on other sites More sharing options...
rajivgonsalves Posted November 2, 2007 Share Posted November 2, 2007 try this <?php //timezone settins how man ours before etc. $hours = 1; $minutes = 0 ; $sign = "-"; $seconds = ($hours*3600)+($minutes*60); $time = ($sign=="+") ? time()+$seconds: time()-$seconds; print date("F j, Y, g:i a")."<BR>"; print date("F j, Y, g:i a",$time); ?> Link to comment https://forums.phpfreaks.com/topic/75744-need-some-help-on-getting-right-time-value/#findComment-383339 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.