Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Time Widget


7 Posts   1862 Views


20 December 2007 at 2:06pm Forum Moderator, 474 Posts

I have created a widget that allows you to see the current time in different cities/countries around the world.



3 February 2008 at 3:43am 57 Posts

The DateTimeZone class is still experimental. It is not enabled by default in e.g. PHP5.1. It works on my Fedora 8 system, but doesn't on my Centos 5.1 server.

Something to fix or document?


6 February 2008 at 10:50am Forum Moderator, 474 Posts

That's strange. says that all Date functions/classes are enabled by default since the first version they were included in, which is 5.1.0 for all the classes I use.

Can you confirm if the functions work? If they do, I can change the widget to use the functions instead of classes.


8 February 2008 at 3:34am 57 Posts

No the functions are not there either.

[lancer@blackbird ~]$ ./test.php
PHP Fatal error: Call to undefined function date_create() in /home/lancer/test.php on line 4

[lancer@blackbird ~]$ rpm -qi php
Name : php Relocations: (not relocatable)
Version : 5.1.6 Vendor: CentOS
Release : 15.el5 Build Date: Thu 20 Sep 2007 04:25:35


8 March 2008 at 12:08am (Last edited: 8 March 2008 12:08am), Community Member, 57 Posts

The time widget only displays the title but not the time.


8 March 2008 at 8:26am Forum Moderator, 474 Posts

That should only happen if none of the locations are set.

Will release a version soonish (will need to get checked by SS though) that has a better check that at least one location is set, can be translated and wont display if the DateTime and DateTimeZone classes don't exist.


8 March 2008 at 8:24pm (Last edited: 9 March 2008 8:01am), Forum Moderator, 474 Posts

And now it's been updated, and is available for download. This version requires 2.2.2.