add 6 hours to the following date

I have the following date.
Sun, 22 Jun 2008 00:00:00 -0400
And I get this from converting a yyyy-mm-dd date to
http://us3.php.net/date r format ( RFC 2822 formatted date)

Is their anyway for me to add like 6 hours to this date?
casitAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
hernst42Connect With a Mentor Commented:
$hour = time() + 6*3600;
or if you already have the value in a variable just
$newHour = $hour + 6*3600;
0
 
RoonaanCommented:
$newData = strtotime('+6 hours', $originalDate);
0
 
Loganathan NatarajanLAMP DeveloperCommented:
just try,

print date("d/m/Y H:i:s",strtotime("+6 hours"));

Open in new window

0
[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

 
casitAuthor Commented:
Here is what I'm getting
Warning: strtotime() expects parameter 2 to be long, string given
with this code snippet
$date1 = $row['date'];
$newdate = date("r",strtotime($date1));
$newdate1 = strtotime('+6 hours',$newdate);

Open in new window

0
 
casitAuthor Commented:
anyone?
0
 
hernst42Connect With a Mentor Commented:
Just

echo date("r",strtotime($date1)+6*3600);
0
 
casitAuthor Commented:
I actually figured the problem out.  It was using wrong timezone.
0
All Courses

From novice to tech pro — start learning today.