convert string time to mongo time