Calendar entry has 2 end dates

I am creating calendar entries with LotusScript and it all works fine, the new entry shows in the calendar on the dates it should. However, something a bit strange. If I open the entry, it has two end dates. In the when section it has an Ends field which has one day added on to whatever the true end date is. Then it has the usually Starts and Ends fields which have the correct start date and end date in them. Does anyone know why this might occur? my document has the following fields:

StartDate - the start date

StartTime - the start time

StartDateTime the start date/time

EndDate - the end date

EndTime - the end time

EndDateTime - the end date/time

CalendarDateTime - the range of dates

Subject - “Holiday”

ExcludeFromView = “D”

OrgTable = “CO”

I can’t figure out where I am going wrong here.