Baseline start and end times in XML

Here is the default XML for a baseline settings block.

	<Settings>
		<PreActionShowUI>false</PreActionShowUI>
		<HasRunningMessage>false</HasRunningMessage>
		<HasTimeRange>false</HasTimeRange>
		<HasStartTime>false</HasStartTime>
		<HasEndTime>true</HasEndTime>
		<EndDateTimeLocalOffset>P2D</EndDateTimeLocalOffset>
		<HasDayOfWeekConstraint>false</HasDayOfWeekConstraint>
		<UseUTCTime>true</UseUTCTime>
		<ActiveUserRequirement>NoRequirement</ActiveUserRequirement>
		<ActiveUserType>AllUsers</ActiveUserType>
		<HasWhose>false</HasWhose>
		<PreActionCacheDownload>false</PreActionCacheDownload>
		<Reapply>false</Reapply>
		<HasReapplyLimit>true</HasReapplyLimit>
		<ReapplyLimit>3</ReapplyLimit>
		<HasReapplyInterval>false</HasReapplyInterval>
		<HasRetry>true</HasRetry>
		<RetryCount>1</RetryCount>
		<RetryWait Behavior="WaitForInterval">PT10M</RetryWait>
		<HasTemporalDistribution>true</HasTemporalDistribution>
        <TemporalDistribution>PT120M</TemporalDistribution>
		<ContinueOnErrors>true</ContinueOnErrors>
		<PostActionBehavior Behavior="Nothing"></PostActionBehavior>
		<IsOffer>false</IsOffer>
	</Settings>

If I wanted to save this XML programatically and wanted to run the baseline at today+1 at 12:00:00AM to 06:00:00AM UTC, how the heck does one manipulate the XML to get that done?

I assume it would have something to do with these lines:

		<HasTimeRange>false</HasTimeRange>
		<HasStartTime>false</HasStartTime>
		<HasEndTime>true</HasEndTime>
		<EndDateTimeLocalOffset>P2D</EndDateTimeLocalOffset>
		<UseUTCTime>true</UseUTCTime>

Any help would be appreciated.

1 Like
            <HasStartTime>true</HasStartTime>
		<StartDateTimeLocalOffset>PT0D0H0M0S</StartDateTimeLocalOffset>
		<HasEndTime>true</HasEndTime>
		<EndDateTimeLocalOffset>PT0D0H0M0S</EndDateTimeLocalOffset>

These will be translated based on your servers time/timezone.

Will that result in 12:00:00AM UTC for start and 06:00:00AM UTC for end?

My example is just an example, with 0 day, hour, min, and sec start/end times.

The time in the XML is, I believe, an offset that gets applied to the time the action is issued so PT2D1H15M30S would start 2 days, 1 hour, 15 mins and 30 seconds from the action issue time. To start or stop at a specific time, you would need to calculate the offset from the time you post the XML.

1 Like

Boy, the timing would have to be just right to get the current time plus some values to land right on 12:00AM

Too bad they made it this complicated