How do I return the time that's showing on my box using PHP?
Posted on 2015-01-08
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.