Originally based on the timeparser library found at: # https://github.com/splunk/eventgen/blob/develop/splunk_eventgen/lib/timeparser.py