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?

Improve company productivity with a Business Account.Sign Up

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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.