I have a .NET 2.0 website that is periodically losing the value for the DateTimeFormatInfo.CurrentInfo.AMDesignator (or PMDesignator) property. This causes code such as Now.ToString() or even Now.ToString("dd/MM/yyyy hh:mm tt") to not properly display the AM/PM designation which then causes date validation to fail. This issue happens sporadically with no sign of when it's about to happen.
During an occurence of the issue when AM was not showing, I confirmed that the CurrentCulture is not being set to something other than the expected "en-US". I also found that the AMDesignator was blank while the PMDesignator would still be populated correctly. I have also confirmed that I can programmatically reset the AMDesignator of the current running thread by resetting the CurrentCulture. However, I would ultimately like to know the root cause.
The issue seems to be resolved by performing an IISReset on the server. I have also confirmed that this does not affect the rest of the .NET framework by running the same test code through a console app on the server. This leads me to believe that it only affects the web sites running in IIS.
Not sure if it helps, but the .NET framework version is 2.0.50727.832 and the OS version is Windows NT 5.2.3790 SP2.
Any help you can offer would be greatly appreciated. Thanks!