the easiset way to add or subtract time is using the epoch. If you do this:

Code

print time;

the return value is the epoch, which is the number of seconds since a certain date in the past, which is a little different for different computers but that does not matter for adding or subtracting small amounts of time from the current time. To subtract one hour:

Code

$time = time - 3600;

Why 3600? Becuase that is the number of seconds in one hour: 60 seconds X 60 minutes X 1 hour.