shane07 Posted January 10, 2008 Share Posted January 10, 2008 Hello I want to add 5 hours and 45 minutes to "date". How can it be done? For example I have $currentdate=date("Y-m-d"); But it doesn't give my local date. It gives the server's date. So I want to add certain hours to date. Thanx in advance Quote Link to comment Share on other sites More sharing options...
interpim Posted January 10, 2008 Share Posted January 10, 2008 add 3600 (secs) for each hour you want to adjust... or subtract if you want to go back from your server timestamp Quote Link to comment Share on other sites More sharing options...
Zane Posted January 10, 2008 Share Posted January 10, 2008 $currentdate=date("Y-m-d", strtotime("+ 5 hours 45 minutes"); Quote Link to comment Share on other sites More sharing options...
shane07 Posted January 10, 2008 Author Share Posted January 10, 2008 $currentdate=date("Y-m-d", strtotime("+ 5 hours 45 minutes"); Thank You for ur reply Quote Link to comment 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.