Add time validation and fetching time segment