Title: Create a true clock
Last modified: August 18, 2016

---

# Create a true clock

 *  Resolved [icco](https://wordpress.org/support/users/icco/)
 * (@icco)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/create-a-true-clock/)
 * I want there to be an actual clock on my webpage. I figured out the basic php
   to get the local time for the reader and or th server time. but what i really
   need is a way for this to keep updating (maybe AJAX or something?) with out reloading
   the page. the final product would a small digital clock on the side of the page.
 * I am making a small plugin out of this just so the code is easily maintainable
 * inside the plugin is the following
 * function nattime() {
    $now = localtime( ); print “$now[2]:$now[1]:$now[0] “; }
 * and in my page
    <div class=”blox”>
 *  The Time is Currently
    <?php nattime() ?> </div>
 * any help to make the time update more frequently then a full page refresh would
   be helpful

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/create-a-true-clock/#post-443878)
 * Lots of scripts out there for real time clocks. Try some of the script sites.
   Why reinvent the wheel?
 * Actually, I think Viper might have a plugin for you:
 * [http://www.viper007bond.com/wordpress-plugins/flash-clock-widgets-for-wp-dash/](http://www.viper007bond.com/wordpress-plugins/flash-clock-widgets-for-wp-dash/)
 *  Thread Starter [icco](https://wordpress.org/support/users/icco/)
 * (@icco)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/create-a-true-clock/#post-443884)
 * aww. but reinventing the wheel is so fun. To be honest i just had trouble finding
   a good script that would work. Vipers plugin is sorta the idea i had but not 
   really, i’ll keep looking
 *  [vkaryl](https://wordpress.org/support/users/vkaryl/)
 * (@vkaryl)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/create-a-true-clock/#post-443888)
 * Heh. Yeah, I understand that as far as it goes. I know I’ve seen some “constant-
   update” scripts on sites like dynamic drive and hotscripts.
 * [Of course, if everyone is using a current OS of any sort, they all have a current
   realtime clock anyway….]
 *  Thread Starter [icco](https://wordpress.org/support/users/icco/)
 * (@icco)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/create-a-true-clock/#post-443925)
 * ya, but this is mainly for me, when i am working or browsing the web i don’t 
   look at my clock, but if a clock is on the page i can realize if i need to stop.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Create a true clock’ is closed to new replies.

## Tags

 * [time](https://wordpress.org/support/topic-tag/time/)

 * 4 replies
 * 2 participants
 * Last reply from: [icco](https://wordpress.org/support/users/icco/)
 * Last activity: [19 years, 9 months ago](https://wordpress.org/support/topic/create-a-true-clock/#post-443925)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
