We have multilingual site, which has content editors from around the world.
We have a maintenance banner on home page which display "Site will be down from dd:mm:yyyy time to this dd:mm:yyyy". This banner should be content manageable. That means content editors can pick From Date and To Date in sitecore to display/hide this banner.
My question is, how does sitecore date time field deal with time zones?
Example scenario:
- In fr-FR sitecore Item version, If a content editor from France added from date today 9 AM To today 12PM.
- In en-GB sitecore item version, if a content editor from London added From date today 9AM To today 12PM.
Does below code, displays banner from 9AM to 12PM in french site at french local time and 9AM to 12PM in GB site at GB local time?
@{ if (ShowBroadcastMessageFrom >= DateTime.UtcNow && ShowBroadcastMessageTo <= DateTime.UtcNow)
{
//Show maintenance banner
}
}
If not, what's the best way to achieve this?