--- loncom/interface/lonhtmlcommon.pm 2005/06/03 15:47:29 1.106 +++ loncom/interface/lonhtmlcommon.pm 2005/06/06 15:54:28 1.107 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.106 2005/06/03 15:47:29 www Exp $ +# $Id: lonhtmlcommon.pm,v 1.107 2005/06/06 15:54:28 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -259,6 +259,7 @@ The method used to restrict user input w sub date_setter { my ($formname,$dname,$currentvalue,$special,$includeempty,$state, $no_hh_mm_ss) = @_; + my $wasdefined=1; if (! defined($state) || $state ne 'disabled') { $state = ''; } @@ -268,6 +269,7 @@ sub date_setter { if (! defined($currentvalue) || $currentvalue eq 'now') { unless ($includeempty) { $currentvalue = time; + $wasdefined=0; } else { $currentvalue = 0; } @@ -279,6 +281,10 @@ sub date_setter { localtime($currentvalue); $year += 1900; } + unless ($wasdefined) { + $sec=0; + $min=0; + } my $result = "\n\n"; $result .= <