JPDeni /Alex
The date related searches I have implemented by making the changes recommended by JPDeni in a prior topic work fine;
To recap, the fixes were :
in db.cgi, change the get_date subroutine as follows:
"The previous code I gave you for finding dates works just fine.
The problem is that get_date needs to be changed.
The changes are in bold print:
code:
(the first 2 lines were changes, and the localtime on the 3rd line was as well)
my($time) = $_[0];
unless ($time) { $time = time(); }
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $daylight) =localtime($time);
my (@months) = qw!Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec!;
($day < 10) and ($day = "0$day");
$year = $year + 1900;
return "$day-$months[$mon]-$year";
---------------------------------------
OK, having said and quoted all that, this works fine AS LONG AS, the user actually logs in to DBMAN. If they try to use a date related query from a default user link, then the search comes up with an invalid date format message with a date of Dec 1969 (the old UNIX I don't have a valid date so therefore this is the date type message)
Now, I think I need to update the date_to_unix subroutine to fix this, however, I'm not sure what to fix.
Any help appreciated.
(man, one of these days I'm going to understand all this and then I'm REALLY going to be scared!!!!)
;-)
TIA
Jamie
------------------
James A. (Jamie) Dennis
*Certified AIX Administrator
*Certified Solaris Administrator
*Member - SAGE, USENIX
The date related searches I have implemented by making the changes recommended by JPDeni in a prior topic work fine;
To recap, the fixes were :
in db.cgi, change the get_date subroutine as follows:
"The previous code I gave you for finding dates works just fine.
The problem is that get_date needs to be changed.
The changes are in bold print:
code:
(the first 2 lines were changes, and the localtime on the 3rd line was as well)
my($time) = $_[0];
unless ($time) { $time = time(); }
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $daylight) =localtime($time);
my (@months) = qw!Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec!;
($day < 10) and ($day = "0$day");
$year = $year + 1900;
return "$day-$months[$mon]-$year";
---------------------------------------
OK, having said and quoted all that, this works fine AS LONG AS, the user actually logs in to DBMAN. If they try to use a date related query from a default user link, then the search comes up with an invalid date format message with a date of Dec 1969 (the old UNIX I don't have a valid date so therefore this is the date type message)
Now, I think I need to update the date_to_unix subroutine to fix this, however, I'm not sure what to fix.
Any help appreciated.
(man, one of these days I'm going to understand all this and then I'm REALLY going to be scared!!!!)
;-)
TIA
Jamie
------------------
James A. (Jamie) Dennis
*Certified AIX Administrator
*Certified Solaris Administrator
*Member - SAGE, USENIX