receives time from user input