Change get_date code to fix issue with test

Signed-off-by: Aniket Pant <me@aniketpant.com>