It seems that when this is event is triggered by clicking on the "Save and publish" event the date is incorrect.
The node's UpdateDate has the local time, but with DateTimeKind "Utc". Thus, is not correct.
When I fire the IContentservice.SaveAndPublishWithStatus event from withing the ContentService's Saved event, the date and time of the node is the same as of the previous trigger, but now with DateTimeKind Local.
internal void ContentService_Saved(Umbraco.Core.Services.IContentService sender, SaveEventArgs e) { foreach (var savedEntity in e.SavedEntities) { //some code omitted like if statements sender.SaveAndPublishWithStatus(savedEntity, 0, false); } }
IContent UpdateDate different when triggered from Publish button than from SaveAndPublishWithStatus on IContentservice
Hi,
We are using Umbraco 7.1.8.
We currently have some code running in the Examine GatheringNodeData event:
In that method we get the node from the Database:
It seems that when this is event is triggered by clicking on the "Save and publish" event the date is incorrect.
The node's UpdateDate has the local time, but with DateTimeKind "Utc". Thus, is not correct.
When I fire the IContentservice.SaveAndPublishWithStatus event from withing the ContentService's Saved event, the date and time of the node is the same as of the previous trigger, but now with DateTimeKind Local.
Is this a bug? Or am I doing something worng?
is working on a reply...