World Time for WordPress
Don’t forget to upgrade! In WordPress, just go to Plugins > Installed > and click on ‘upgrade automatically’ below Utech World Time
Useful links:
Please use the comment box below or send me an email for support or feedback.
Utech World Time for WordPress creates real time world clocks on your WordPress posts or pages using simple shortcode. The customizable clocks show the name and current time of the location of your choice. Currently there are well over 600 locations available.
- The clocks display the current time, even if the user’s computer clock is wrong.
- They automatically adjusts for Daylight Saving Time.
- All the major time zones are supported.
- Customizable and easy to include with shortcode.
How to use
Download the plugin from here, unzip it and save it in the wordpress plugin folder. Then activate it and enjoy.
Create a simple GMT/UTC clock by typing [worldtime] anywhere in your text. This will give you:
Use the ‘places’ parameter to specify the clock’s time zone like so
[worldtime places="Paris"] …
List several places sperated by a comma e.g.
[worldtime places="Paris, New York, Brisbane, Perth"]. This will create multiple world clocks below each other. Please note that there is currently a limit of 6 clocks you can create with one shortcode statement:
Complete list of parameters of this version
places
Takes a list of comma separated towns
base_color
Background color e.g. base_color=fff
base_font_color
Location font color e.g. base_font_color=000
base_font_size
Location font size
clock_color
Time background color e.g. base_color=bbb
clock_font_color
Clock font color e.g. base_color=666
clock_font_size
Clock font size
gap
Space between individual clocks in a stack
width
Overrides width in pixels
sec
Will hide seconds if set to 0, e.g. sec=0
What you need to know
This plugin utilizes services provided by TimeAndDate.com and is made possible with their friendly permission.
TimeAndDate’s condition of use stipulates a maximum of 6 clocks per page. In future this limit will be removed however for now it is important to stick to it as each clock creates a connection to their server (and ours). TimeAndDate also requires a separate link to their site if more than two clocks are used.
List of Locations used in World Time for WordPress
For a complete list of all available locations (places parameter) go to Locations


[...] World Time for WordPress Plugin erlaubt die Anzeige der aktuellen Zeit aus allen Zeitzonen der Welt. Die Ausgabe kann gestyled [...]
[...] World Time for WordPress Plugin von Utech Computer Solutions erlaubt die Anzeige der aktuellen Zeit aus allen Zeitzonen der Welt. [...]
Hi!! I want to put some clocks (about 4 or 5) directly in my theme php. Any suggestions about how i do that?
Thanks!
Hi Fábio ZC,
That shoudn’t be a problem. As far as I understand from what you are doing, you can’t use the shortcode, but want to create the clocks with php code. What you need to do is create an iframe with:
src="http://www.mandronline.com/wp/wt/wt.php"That should give you the standard GMT clock. Next you want to give it some juice (parameters) e.g.
src="http://www.mandronline.com/wp/wt/wt.php/?Loc=Paris"these paramters have different names to the ones I have used for the shortcode, but you can easily find out what they are if you have a look at my code in utech_world_time.php, from line 62 onwards.
Obviously if you need php to create the iframe you use the echo command.
Pleae let me know if this answers your question or if you need more info.
Cheers
Meini
Hello,
this is a great plugin and it worked at my test server good. But now on my live server it isn’t working any more in my sidebar, only in the post with the shortcode.
In my sidebar I wrote a iframe with the link you said. But I get know the message “Please upgrade..” and when I’m trying to link it to the plugin-php file I get an error. (you can still see it online) So, can you help me with it, please?
Thanks.
Hi Chrissy,
I am sorry but above information is outdated. It is not valid any more for version 1.0 and won’t even work with the previous versions any more because it relied on information from our server. The new version works independently. So you really need to upgrade the plugin to the newest version first and then things should work.
A common trap with shortcodes also is that people copy and paste sample code not realizing that they also copy the html code that makes it remain visible as code. So you really need to switch to the HTML tab and make sure the shortcode is there, nice and clean without additional tags. If you do copy and paste, paste it in HTML, never on the Visual tab.
With regards to putting it onto the sidebar I have just created a solution here on this page’s sidebar using the Sidebar Shortcodes plugin by Dan Coulter. I simply used the Text Widget for it. Works well although I haven’t tested it on WP3.0 yet. I am still running on 2.9 (shame on me).
See how you go and let me know if you get stuck.
I am using this method on a non-profits website running wp3.01 in the sidebar text widget like you mentioned. I have it enclosed in div tags to control positioning and it seems to work fine on most up to date browsers under winxp like Chrome, Safari and FirFox, with one exception, testing with IE8 (w and w/o compatibility) I get an ‘error on page’ alert stating “Invalid Character” even though everything appears to be working fine. The error seems to be coming from a onmouseover function call in the script. Any ideas on how to make that error go away? Thank You
Herb, thanks for your comment. Meanwhile I am running the latest version of WordPress and things work fine.
What I found with IE is that its code is very unforgiving when it comes to unclosed tags etc.
So the first thing to do is make sure your code in your Text Widget is fine. Switch to HTML for that. It really only needs the shortcode, but if there is more make sure all tags are closed properly.
If that does not resolve the issue try this: Since things work here, and not with your installation, I suspect that it has to do with another plugin. To test that, simply disable all plugins except the World Time Plugin and see if things work. I bet it will work, if it does, enable them one by one until you find the offender.
Another quick thing you can do first is to move the Text Widget with the World Time shortcode right up the top and see what happens. If it works, then it simply proves the point that something else must be the problem.
See how you go.
Cheers
Meini
Meini,
Thanks for your reply. As indicated in my original message the clock works just fine in the top 4 browsers, I just get an error message for people using IE8, even though the clock is working just fine.
This only worries me because I am afraid it will lower confidence in the site with it’s visitors and as you know repeat visits are important.
I could not find any unclosed tags or conflicting scripts and the clock is the first widget in the sidebar and is located at the top. I tried with and without my div tags too and that didn’t help either.
But what I did find that seemed to fix the error and allow the script to continue to function normally was to simply remove the offending portions of the script which simply control the color of the text/URL linking back to your site:
onmouseover=”this.style.color=#’.$base_font_color.’;”
onmouseout=”this.style.color=#’.$base_font_color.’;”
once those two lines were removed the error messages went away, not just on my local machine but also on a few beta testers as well. So far no complaints and all aspects of the plugin appear to be working without errors now. Let me know if you see any issues with this method. The site in question is linked to here.
Best Regards and thanks for the plugin and hard work.
Herb
Thanks Herb, I will look into this.
Talk to you later …
Meini
[...] World Time for WordPress [...]
Love it. But I can’t seem to get some of the options to work.
Can you give a syntax example using all the options?
Thanks again for your work.
Thanks Sahara, If you tell me what you are trying to achieve, I am happy to give you a hand. I will also see that I can create an example page over the next few days.
It would be sweet to create a world time clock showing:
Paris, San Jose Calif., London England, Moscow, the Altai region of Siberia (no idea what city there, but I have good friends there), Rio (South America), Chile, and so on.
I must be doing something wrong with basic syntax, because I cannot get any of the options to work.
Background color: #EBDFD6
Centered beneath your beautiful spinning globe.
Just a note on proper syntax, using different options, is probably enough for me to proceed. Is there a list of locations I can use, so I can specify exact locations?
No need for you to spend a lot of time on this — I don’t want to be a bother.
Sahara, please find a list of all locations here: http://www.utechworld.com/locations/
I have also created a sample page that should look pretty much the way you would like to have it: http://www.utechworld.com/projects/sample-page/
You may also want to check out World Time Manager, it is a share ware program that I wrote. You can use it to put actual world clocks on your desktop.
Excellent! I see now what I was doing wrong. Your example makes it very clear.
By the way, I just realized… the moon does not spin — probably not a good next project.
Your spinning globe is now on my site and it helps me create a message that is very appropriate for my readers — “Love the Earth, It’s now or never…”
Thanks again — much appreciated!
Good on you Sahara!
Are you sure that the moon does not spin? Being an earthling I agree totally as we always see the one side of the moon only. However, by going around the earth every 28 days or so, it is doing one full turn around its own axis. So a silent observer from a fixed point in our solar system can see the moon spinning slowly while it meanders its way around the earth and the sun throughout the year.
So the moon spins *and* it doesn’t. It is like that with most things in life, there is no single truth! Oh, how I love practical philosophy!
Great plugin!
Is there a way to have the 24 hours time format (ie 18:00 instead of 6:00 PM) ?
Hi Emeric,
24 hour format is not supported at the moment, but I will make sure I implement that in the next version.
Thanks for suggesting it.
Cheers!
Thanks for plugin! Also waiting for 24 hour time format!
Hi Meini, i’ve tried you plugin but i’ve got this error
Fatal error: Call to undefined function array_fill_keys() in /wp-content/plugins/utech-world-time-for-wp/loc.php on line 653
I got the same error if I use shortcut in posts or in sidebar.
I tried with all other plugin deactivated but it’s the same.
I use WP 2.9.2, any suggestion?
Thanks
Maybe found.
Your’s script needs php 5.2 or greater, my host has 5.0.4
Thank time zone
Hi Meini,
It seems no matter which order you enter the towns, they always display in alphabetical order. This of course leads to Brisbane being above Sydney and that is an unnatural state of affairs.
Brisbane is north of Sydney
Alright, I will take a note of this for the next release.
I am trying to change the City font color how can I do that…
[worldtime places=”Glasgow, Los Angeles, New York, Warsaw, Tokyo, Sydney”
Just use base_font_color=rgb, where rgb should be the number of your color in hex. This can be 3 or 6 digits. For example red is f00 or ff0000. You can find the color of your website componentes in your CSS file or use a color picker (any recommendations welcome) or just about all grapic programs show you this number somewhere.
e.g. [worldtime places="Paris" base_font_color=09f]
Hello, is plugin still working? I’m using wp 3.0.5 and it seems like code [worldtime] is not supported.
Mindaugas, I am using WP 3.1 now and I have had no problems with [worldtime] since I upgraded, perhaps updating to the latest version will help you out.
That said though, I had no problems when I was still using WP 3.0.5 either. One thing that may help is to be sure your theme supports the [shortcode]. I found out the hard way that not all themes support [shortcode] right out of the box. So, if your using the clock in the sidebar like I do, take a look in your theme functions file (functions.php) and see if you can find the following piece of code:
add_filter(‘widget_text’, ‘do_shortcode’);
if you don’t see it, try adding it to the bottom of the functions page on a line all alone, save, and then see if the clock works. That’s all I could think of right now, I hope that helps and sorry if it don’t, let us know if that does work or if you find an alternate fix.
Best Regards,
Herb
tried it on several webpages running different wp versions and I get
the same results. Looks like is not supported at all, I did the thing you wrote me, no
difference. It crashes the whole website. If I use [worldtime] in a
post content (loop) it cuts everything thats goes after the content
with the content itself, in this case footer is gone. Here I created a
page called “time” so You could see the result ->
http://bartzuve.lt/time/ and If I display particular page content in
my template file it shows this code “[wordpress]” and nothing happens.
That is a great plugin I was looking for, actually with 24h support,
but sadly I cannot use it during to these errors.
Sorry that didn’t help Mindaugas. I tried to use that sidebar fix on the Twenty-Ten Theme and it didn’t work for me either. Your page broke right after the first post div tag, but I didn’t see any links to the plugin in what source code was there. Could be an installation issue.
However, I was able to get the plugin to work on my server when used in posts and pages very easily by just placing the [world/time] tag where I wanted it. I added that / on purpose, so it wouldn’t display the clock in this comment. Also, be sure your editing in HTML Mode and not VISUAL mode as that has given some people trouble in the past, view previous comments above.
I made a test page and post to show you, if you want to see it go to: http://www.wptesting1.hsgoodman.org/ The site is in English, but I may have the Google Translator activated by the time you see this.
I put some information on there about what I used to test it too, hoping that may help Meini get it listed as WP 3.1 compliant! Works For Me…and not one complaint from the client or any of the visitors to their site (linked under my name).
Best Regards,
Herb
The clock looks good on your test page and I can’t figure it out why it’s not working on mine. What php version required for it to work? Cause my server uses 5.1 with wordpress 3.0.5.
I think the plugin requires PHP 5.2 or higher.
is there any way to change the font of the clock?
Is there any way to make it so that some css is applied or like, I want it to have the style of other widgets in my side bar, thanks…
On my website http://www.allied-authors.com , Worldtime I would like to change the word ‘Bern’ to Zurich (same time zone) or ‘Home’. How would one make this change?
Marc
Hi Marc,
Thank you for your enquire. Your best bet is to modify the file loc.php, which you can find in the plugin folder …/wp-content/plugins/utech-world-time-for-wp.
Open the file in a text editor and have a look for Bern and simply replace it with Zürich. Then in your short-code you obviously use Zürich as well.
Hope that makes sense. Let me know how you go.
Cheers
Meini
Hi Meini
Thank you – it worked, no sweat. By the way what are the numbers in the file ‘loc.php’ referring to?
Great clock, some of my friends in the rest of the world set a link to my webpage just to have the worldtimes handy.
Regards
Marc
[...] visit the plugin page for further questions or [...]