November Happy Hour will be moved to Thursday December 5th.

Overwrite PageData.Changed on save/publish

Vote:
 

Hi,

Is it possible to change Changed property of PageData object? I'm trying to set a date in the past but it always saves the current date. I tried to set it both on save new object and on publish modifier object and nothing works. Setting SetChangedOnPublish does not affect the result.

TOutput output = _contentRepository.GetDefault(parentReference);

(set other properties)
output.Changed = someDateInput;

_contentRepository.Save(output, SaveAction.Save, AccessLevel.NoAccess);
var output = (TOutput)readOnlyOutput.CreateWritableClone();

(set other properties)
output.Changed = someDateInput;

_contentRepository.Save(output, SaveAction.Publish | SaveAction.ForceCurrentVersion, AccessLevel.NoAccess);


output object has expected Changed date while I pass it to Save() method.

I use EPiServer CMS 9.

#182550
Edited, Sep 22, 2017 13:15
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.