1. Good point @rana… the code above is set to the time zone of the server in use. The offset is adjusted by comparing the time displayed (using the offset of zero) to the time you want to appear. I live and work in the Eastern Standard Time (EST, same as New York, USA) and EST is the time zone for the sites I usually build. As mentioned in the post above I know it works on at least the one implementation I’ve used because the time was “set” the that day I wrote the post.

    This is the code I ended up with this to get EST:

    < ? $mytime = time(); offset=1; $mytime = $mytime + ($offset * 60 * 60); echo $mytime; ?>

Leave a Reply

Your email address will not be published. Required fields are marked *