View Single Post
Old 02-27-2004, 02:46 AM   #1 (permalink)
Epsilon
Regular Contributor
 
Epsilon's Avatar
 
Join Date: Mar 2003
Location: Las Vegas, NV
Posts: 127
Epsilon is on a distinguished road
Adjusting date() function for time zones

I'm writing a script for a guy who wants current Pacific date and time displayed, but his server in on the East coast. He's on a virtual hosting account so I can't adjust the time settings on the server.

I'm using
Code:
$this_date = date("D M j, Y, g:i A")
Which produces something like:
Fri Feb 27, 2004, 6:33 AM

Is there a way to adjust this for the 3 hour time difference or should I be using a different function? I thought about just using time(), then subtracting 10800 seconds from it and converting it into a formatted date like the one above, but I'm not sure how to do the conversion part.
__________________
--Epsilon--
Epsilon is offline   Reply With Quote