Is an Allday = true appointment supposed to imply that the appointment should be 24 hours in duration?

Below is code that logs in and creates appointments on June 2, 2008. If you look at the details view of the appointment created by the program in details view of the calendar, it shows one hour of duration. Opening the appointment shows All Day Appointment is checked. Unchecking the All Day appointment, rechecking it, and clicking "post" makes your user unavailableall day as it is supposed to. You can also then look at the details view and see it is now 24 hours long.

I worked around the problem by setting a duration, just wondering if this is the way it is supposed to work.


Here's the code in VB.Net:

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Connect to GroupWise account
Dim account As GroupwareTypeLibrary.Account
Dim gwRecipients As GroupwareTypeLibrary.Recipients
Dim message As GroupwareTypeLibrary.Message
Dim AppointmentDate As String = Nothing
Dim AppointmentSubject As String = "Test Appointment"

Dim objGroupWise As GroupwareTypeLibrary.GWSession
objGroupWise = CreateObject("NovellGroupWareSession")
account = objGroupWise.RootAccount

message = account.Calendar.Messages.Add("GW.MESSAGE.APPOINTM ENT",3)

gwRecipients = message.Recipients
gwRecipients.AddByDisplayName(account.Parent.Name. ToString)

'Make All Day Appointment that shows up as Out of Office in Busy Search
With message
.OnCalendar = True
.FromText = "Sending User"
.StartDate = "6/2/2008 00:00" ' appointment starts now in format of MM/DD/YYYY 12:00:00 AM
'You'd think I wouldn't have to set Duration since it's an all day appointment - but I have to.
'.Duration = 1 / 24 * 24 ' Duration is in hours (Decimal format)
.Allday = True 'Sets the Appointment as All Day Long
.BusyType = 2 'Sets the Time as "Out of the Office"
.Subject.PlainText = AppointmentSubject
.BodyText.PlainText = "Test Appointment"
End With

End Sub
End Class