Builds the Timespan object.
Timespan object.
if both startTime and endTime are provided and endTime is not after startTime.