You are in Home page » Products » Opensource » WebGUI » WebGUI DateTime replacement |
![]() |
![]() |
|||
![]() |
![]() |
WebGUI::DateTime: a replacement with no 1970 bug.Current version: WG6/2004-08-04 - WG6/2004-08-07All 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 DateTime.yyyymmdd.pm 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/Session.pm replacing use Date::Calc with use Date::Manip and replace _time function like this sub _time {
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 Milonic.com |
![]() |
|
![]() |
![]() | ||
Copyright© 1997-2006 Emiliano Bruni | Online from 16/08/1998 with |
Write me to:
![]() |