Sei in Home page » Prodotti » Opensource » WebGUI » WebGUI DateTime patch

Soluzione integrata di telefonia su internet a banda larga.
Cerca su questo sito:  

Vuoi essere aggiornato in tempo reale su tutto quello che mi succede giorno per giorno?
Visita il mio nuovo blog

WebGUI::DateTime: una versione non afflitta dal bug del 1970.

Current version: WG6/2004-08-04 - WG6/2004-08-07

All WebGUI versions have an annoying bug in the date management that doesn't permit to enter date before 01/01/1970 in EVERY date(time) field.

In truth, problem didn't arise in WebGUI, but in a module dependence : Date::Calc that supports only date after 01/01/1970, that is only positive epoch time .

Also if a patch exists for this problem and you can find an unofficial Date::Calc version not affected by this bug here, the problem is that the module author doesn't seems to release soon (and later too) an update with this patch.

I faced problem from another point of view, rewriting from a scratch, the WebGUI module (WebGUI::DateTime) that depends by Date::Calc to use another CPAN module where author is more sensitive to community problems.

This replacement don't use at all Date::Calc but Date::Manip and is completely equivalent to original module.

I tested my module under 5.5.8, 6.0.1 and 6.1.1 and it seems to work fine.

To remove WebGUI 1970 bug, you must install Date::Manip from CPAN source or using your CPAN module with

perl -MCPAN -e 'install Date::Manip'


Then you can download my module and copy it to your lib/WebGUI folder.

Restarting apache should make your WeGUI free from 1970 bug.

There is another dependence to Date::Calc in WebGUI::Session. If you wish to completely remove WeGUI dependence from Date::Calc you can modify WebGUI/ replacing use Date::Calc with use Date::Manip and replace _time function like this

sub _time {
    return &UnixDate(&ParseDate("now"),'%s');


Hoping this patch will be soon introduced in standard WebGUI.

Developing note: this patch has been developed in an hot August night, from 2am to 6am.

JavaScript Menu Courtesy of

 Copyrightę 1997-2006 Emiliano Bruni Online dal 16/08/1998 con visitatori Scrivimi all'indirizzo: