Listing posts under a category by date

Even though it is not the most conventional way of doing, I would proceed like this:

Edit : precision
I create a new file category.php which is the template for categories, and put this piece of code inside.

$args = array(  'post_type'=>'post',
    'posts_per_page'=> -1,
    'post_status'=>'publish',
    'orderby'=>'post_date',
    'order'=>'DESC'
    );

$query = new WP_Query($args);

if($query->have_posts())
{
    $years = array();
    $postList="";
    foreach ($query->posts as $post) {

        //if we haven't proceed the year yet
        // we display it
        if(!in_array($year = get_the_date('Y',$post->ID),$years))
        {
            $postList.=sprintf('<h2>%s</h2>',$year);
            $years[] = $year;
        }

        $postList.=sprintf('<h3><a href="https://wordpress.stackexchange.com/questions/298989/%1$s" title="%2$s">%2$s</a></h3>',get_permalink($post->ID),$post->post_title);

    }

    echo $postList;

}else{

    _e('No posts sorry','your-text-domain');

}