I'm working on a script that uses the time() and date() functions. The system clock is set in EDT (Eastern)time and I need to convert the time and date to PDT (Pacific). I've been able to convert the time OK by subtracting 3 hours from the system time.
But I'm having difficulty with the date. After 9PM PDT, the date() function returns a date one day ahead of the date in PDT. So, I somehow need to adjust the date by subtracting 3 hours from the EDT date. (Hope that's clear <g>).PHP Code:
$time = date("H:i:s", mktime(date("H") - 3));