I am trying to do a deploy of an old (i.e. I did not write it) application that is not locale or date-time formatting agnostic. Fixing the code of the application is not an option at the moment.
We are encountering issues moving this application from one server to the next, as the date format is coming though as dd/mm/yyyy on the new server, but mm/dd/yyyy on the next.
The original server is a Windows Server 2008 install. It is an ASP.NET application hosted on IIS.
The new server is a virtualized environment running ESX. The VM is a Windows Server 2008 image.
Simple investigation did reveal that the new VM's date settings were configured to a different locale (which did default to dd/mm/yyyy). However, we have reconfigured and restarted the VM and are seeing the same behavior.
Any ideas about where this setting might be pulling from on the new VM? Or perhaps of a process that we need to follow to force the VM's date settings to change the formatting that the ASP.NET framework is receiving?
Thanks, badPanda
Set the proper globalization Tag in the web.config file.
Setting the Culture and UI Culture for Web Forms Globalization: By specifying a culture it is possible to use a set of common preferences for information like strings and date and number formats that correspond to users' cultural conventions.
globalization: Configures the globalization settings for an application.
Eg.
<configuration>
<system.web>
<globalization culture="en-US" uiCulture="en-US" />
</system.web>
</configuration>
culture: Specifies the default culture for processing incoming Web requests.
uiCulture: Specifies the default culture for processing locale-dependent resource searches.