Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

How do I return the time that's showing on my box using PHP?

When I do this:

echo date("g:i a");

I get 7:06 PM. Looks great! But the time on my computer is 12:06 PM.

I'm running this script from my localhost, and since I'll have users all over the place, I didn't want to set my default time zone for this particular function. I just want to post the same time that's sitting on their computer on my site.

How?
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bruce Gust

ASKER

Thanks, Dave!

Found a Javascript clock that works great!

Rock on!
You're welcome.