my ($SECdt, $MINdt, $HOURdt, $DAYdt, $MONTHdt, $YEARdt) = localtime($datetime);
$SECdt = sprintf ("%.02d",$SECdt);
$MINdt = sprintf ("%.02d",$MINdt);
$HOURdt = sprintf ("%.02d",$HOURdt);
if ($cgiparams{'DAY'}==0) { # full month
$DAYdt = sprintf ("%.02d",$DAYdt);
my ($SECdt, $MINdt, $HOURdt, $DAYdt, $MONTHdt, $YEARdt) = localtime($datetime);
$SECdt = sprintf ("%.02d",$SECdt);
$MINdt = sprintf ("%.02d",$MINdt);
$HOURdt = sprintf ("%.02d",$HOURdt);
if ($cgiparams{'DAY'}==0) { # full month
$DAYdt = sprintf ("%.02d",$DAYdt);