I ran into the same problem several times, following changes worked for me in the past:
while (have_posts()) : the_post();
<li class="icon-date"><?php echo get_the_date( 'Y-m-d' ); ?></li>
<li class="icon-time"><?php the_time( 'H:i:s' ); ?></li>
get_the_date(). The only thing to be aware of, is that values returned by get_the_date() have to be echoed.
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.