MasterACE14 Posted September 27, 2007 Share Posted September 27, 2007 Whats the most simplest way to use the time() function to grab the current time in the GMT+10 timezone? Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/70884-solved-grabbing-the-time-for-gmt10/ Share on other sites More sharing options...
rarebit Posted September 27, 2007 Share Posted September 27, 2007 date() http://uk3.php.net/manual/en/function.date.php Quote Link to comment https://forums.phpfreaks.com/topic/70884-solved-grabbing-the-time-for-gmt10/#findComment-356337 Share on other sites More sharing options...
MasterACE14 Posted September 27, 2007 Author Share Posted September 27, 2007 I got it working, Here's my final Script for anyone else who may need it: <?php $date=date(U); // format date for calculation in seconds //print ("$date"); //if you want to see the date format now $hourdiff = "16"; //change the server time plus sixteen hours $timeadjust = ($hourdiff * 60 * 60); //this is how to calc it $adjtime = date("M j, H:i", $date + $timeadjust); //format display print ("$adjtime"); //print the adjusted time ?> Regards ACE Quote Link to comment https://forums.phpfreaks.com/topic/70884-solved-grabbing-the-time-for-gmt10/#findComment-356356 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.