When setting this property: Revit does not accept input DateTime objects if they are of kind DateTypeKind.Unspecified.
Remarks
This property represents the end time for a single-day or multi-day study. The end date and time can be set for any study type, but is not always used. Note that Revit may ignore this value if the SunriseToSunset flag is set.