Make sure hours in JSON are sorted correctly