Below code that I added before loop in archive.php doesn't work. However, it works without '&day='.$day. code that I added for viewing posts by day. I have no idea what is wrong with this code. can anyone tell me what to fix? thanks in advance.
$loggedin_user_name = $current_user->user_login;
$year = get_the_time('Y');
$month = get_the_time('m');
$day = get_the_time('d');