diff --git a/intents/daily/date_and_time/intent.py b/intents/daily/date_and_time/intent.py index 005e307..ca54783 100644 --- a/intents/daily/date_and_time/intent.py +++ b/intents/daily/date_and_time/intent.py @@ -1,9 +1,18 @@ +import time + import utils.intents_utils +from utils import config_utils def what_time_is_it(): + current_time = time.localtime() response = utils.intents_utils.get_response("what_time_is_it") - response.replace("{time}", "18:41") + + if config_utils.get_in_config("12HOURS-FORMAT"): + response = response.replace('{time}', time.strftime("%I:%M %p", current_time)) + else: + response = response.replace('{time}', time.strftime("%H:%M", current_time)) + return response