Fixed time parser to work correctly