Computer systems allow the setting of a “culture” to present and interpret data that varies by language and region, such as the formatting of dates and numbers. For example, in the United States, it is common for the date of November 1st, 2022, to be represented as 11/1/2022 (MM/DD/YYYY). However, in Australia, the same date is typically represented in the format of DD/MM/YYYY which results in 1/11/2022. This can lead to significant confusion unless the rules for interpretation are clearly established.
A similar, but more obvious, confusion occurs in differing cultures that switch the use of commas and periods as separators for decimal and thousands. For example, 1,234.45 in the United States may be represented as 1.234,56 in other cultures.
A personal computer or server has an established culture set when the computer’s operating system is initially installed. It can be changed later if the computer is reoriented to a different region, but the change may not propagate elsewhere as expected. To make matters more confusing, the operating system may have set a culture that differs from individual users or services on the same computer.
Specifically, in the case of Microsoft Dynamics eConnect, the computer’s operating system may operate under a culture that differs from the culture that governs the eConnect or website processes. Knowing this to be a potential problem, PanatrackerGP’s System Status page makes it easy to view the culture settings relevant to interaction with Dynamics GP.
In the System Status page, these settings are displayed:
- Server Default Culture represents the culture installed with the operating system (i.e. CultureInfo.InstalledUICulture).
- Portal Culture represents the culture configured for the system account running the PanatrackerGP portal and integration (i.e., Thread.CurrentThread.CurrentCulture).
It is possible that the eConnect service could be running under a completely different culture as well. If so, this can lead to other problems when passing a date such as given at the top of this article.
Ideally, the server operating system and all computer accounts and processes will all use the same culture to avoid any confusion. If this is not the case, the interpretation of dates may be improperly applied by switching month and day, or by failing completely if the resulting switch yields an improper date.
The setting for operating system and account culture differs per version of Windows. Consult your documentation to determine how to correct the settings for localization and culture.