Correct time parsing function. Fixes #7.