Try our conversational search powered by Generative AI!

sheider
Apr 15, 2024
  594
(1 votes)

.Net Core Timezone ID's Windows vs Linux

Hey all,

First post here and I would like to talk about Timezone ID's and How Windows and Linux systems use different IDs.

We currently run a .NET Core site with Opti CMS and Customized Commerce (B2B Commerce) all hosted in DXC. And with our solution we had an automated process of what would be a scheduled publish of our commerce items.

We identified we had issues where our commerce items would publish early. Our investigation found that if you are using Timzezone ID's or just using the OOB TimeZoneInfo, the results you get will vary from your local development in windows to where its deployed to, in our case DXC (Linux).

With this in mind, we had to find a conversion nuget that would allow us to enter a windows timezone ID and allow it to auto convert it based on the environment it was deployed to.

https://github.com/mattjohnsonpint/TimeZoneConverter is the conversion nuget we use.

**Notes to those on .net 6+ from that Repository listed above:

.NET 6 has built-in support for IANA and Windows time zones in a cross-platform manner, somewhat reducing the need for this library. It relies on .NET's ICU integration to perform this functionality. See the .NET blog for details.

I Hope this information is useful to those of you who are working in .Net Core and are having issues with scheduled publish discrepencies.

Cheers,

Sean Heider

Apr 15, 2024

Comments

Please login to comment.
Latest blogs
Do not upgrade to EPiServer.CMS.Core 12.21.4 without reading this!

Todays update of EPiServer.CMS.Core 12.21.4 alters default sort order in an unexpected way, when you are working with muligple languages and have...

Tomas Hensrud Gulla | May 14, 2024 | Syndicated blog

Upgrade Optimizely CMS From v11 to v12

Why Upgrade? There are many improvements implemented in version 12, but most importantly is that the whole framework is migrated from .Net Framewor...

MilosR | May 13, 2024

Configured Commerce - Infrastructure Updates Ahoy!

I'm very happy to share an important milestone - we no longer have any customers in our legacy v1 environment!  This means that the Configured...

John McCarroll | May 10, 2024

A day in the life of an Optimizely Developer - Enabling Opti ID within your application

Hello and welcome to another instalment of A Day In The Life Of An Optimizely developer, in this blog post I will provide details on Optimizely's...

Graham Carr | May 9, 2024