Sounds like you used a client-side language to display the time. If you want the time to be based off of the server's time, then you'd want to use a server-side language (such as PHP).
For that, look at using PHP's [man]date/man function to display the date/time in whatever format you'd like.