I have just recently switched from a server running BSD to a server running Red Hat Linux. My dbman script is working perfectly on the original server but chokes on the Date fields on the new server (Invalid date format). Would the OS have anything to do with this? The configuration and script is identical on both platforms.
Jul 7, 2001, 10:05 AM
Veteran (17240 posts)
Jul 7, 2001, 10:05 AM
Post #2 of 4
Views: 2518
This problem is probably associated with Perl 5.006 which is probably installed in your new web server. Codes for fixing Perl 5.006 problems were posted in the Links 2.0 Installation-UNIX Forum awhile back.
Search that forum for Perl 5.006 Date Format.
Regards,
Eliot Lee
Search that forum for Perl 5.006 Date Format.
Regards,
Eliot Lee
Jul 7, 2001, 10:45 AM
New User (2 posts)
Jul 7, 2001, 10:45 AM
Post #3 of 4
Views: 2516
Anthro,
Thanks for the quick response and yes, you were absolutely right. In db.cgi- sub date_to_unix routineThe fix is as simple as modifying :
$time = timelocal(0,0,0,$day, $months{$mon}, $year);
to
$time = timelocal(0,0,0,$day, $months{$mon}, $year1);
Simply insert a "1" after $year. Thanks to designerx for the fix and Anthro for pointing me in the right direction
This was driving me nuts .
Thanks for the quick response and yes, you were absolutely right. In db.cgi- sub date_to_unix routineThe fix is as simple as modifying :
$time = timelocal(0,0,0,$day, $months{$mon}, $year);
to
$time = timelocal(0,0,0,$day, $months{$mon}, $year1);
Simply insert a "1" after $year. Thanks to designerx for the fix and Anthro for pointing me in the right direction
This was driving me nuts .