While it does the same thing, it may be easier to manage using mktime()
PHP Code:
$time = date("H:i:s", mktime(date("H") - 3));
Which basically does what Skunk's code does but using mktime() you can subtract 3 hours. mktime() takes 5 optional args, starting with hour, minute, second, month,day,year if any are left out on the right it takes the current values of each one. So that example would produce the same result as
PHP Code:
$time = date("H:i:s", mktime(date("H") - 3, date("i"), date("m"), date("d"), date("Y"));
Bookmarks