Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
EPiServer.CMS.Core 10.0.1
EPiServer.CMS.Core 10.6.0
Feb 01, 2017
Mar 24, 2017
CMS Core
Closed, Fixed and tested
Steps to reproduce
public void Initialize(InitializationEngine context) { var events = ServiceLocator.Current.GetInstance<IContentEvents>(); events.PublishedContent += DoSomething; } private void DoSomething(object sender, ContentEventArgs e) { if (e?.Content != null) { var filter = new FilterPublished(); var value = filter.ShouldFilter(e.Content); } }
Expected: "value" should be "false".
Actual: "value" is "true".
Developer note: The filters use ITimeProvider to make sure there is a consistent time validation for a single request. Before CMS 10, the StartPublish was getting the same value as created date which was also based on the time provider. In CMS 10, the default value for StartPublish was added when content was published, but it used DateTime.Now instead of the request time. This fix changes to that StartPublish takes time for the ITimeProvider.