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.

Archive /

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

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

Time Widget


Reply


7 Posts   1878 Views

Avatar
simon_w

Forum Moderator, 474 Posts

20 December 2007 at 2:06pm

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

[url]http://silverstripe.com/widgets/[/url]

Avatar
lancer

57 Posts

3 February 2008 at 3:43am

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?

Avatar
simon_w

Forum Moderator, 474 Posts

6 February 2008 at 10:50am

That's strange. php.net 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.

Avatar
lancer

57 Posts

8 February 2008 at 3:34am

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

Avatar
ulysses

Community Member, 57 Posts

8 March 2008 at 12:08am

Edited: 08/03/2008 12:08am

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

Avatar
simon_w

Forum Moderator, 474 Posts

8 March 2008 at 8:26am

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.

Avatar
simon_w

Forum Moderator, 474 Posts

8 March 2008 at 8:24pm

Edited: 09/03/2008 8:01am

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