Moved all the timestamp parsing code into its own class with its own unit tests. This is to make testing easier. Change-Id: I624472baba51dfa1254a9f4bae55ebb79e310855