I know myself it can be difficult if your a newbie getting time to work correctly in PHP, and it can be even more difficult setting the timezone, so here is how to do it!
This will display ##:## (# = Time) in 24 hour format.Code:<?php putenv("TZ=Europe/London"); echo "<h3>The time is now: " . date(" H:i")." GMT+</h3>"; ?>
Here is the PHP Manual if you wish to format the time differently: PHP: date - Manual
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks