Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Default individual publish times use incorrect time conversions

Found in

EPiServer.Commerce 11.0.0

Fixed in

EPiServer.Commerce 11.4.1

(Or a related package)

Created

Nov 15, 2017

Updated

Nov 17, 2017

Area

Core

State

Closed, Fixed and tested


Description

Steps to reproduce

1. Create a new entry using ICatalogSystem.
2. Create a meta object for the new entry, not specifying Epi_StartPublish nor Epi_StopPublish.
3. Load the content corresponding to the entry.

Expected:
StartPublish equals StartDate of the DTO/CatalogEntry table (time zone taken into account). Same for StopPublish/EndDate.

Actual:
The values are not equal, StartPublish/StopPublish are offset according to the UTC offset.

Comment: This happens because when getting the default (fallback) value for Epi_StartPublish/Epi_StopPublish in the meta object, the value read from the database is not correctly converted to a specific DateTimeKind. Hence, it does not happen if those values are specified, like when creating content using content repository.