parse end times correctly