Reputation: 8630
We're maintaining an old classic ASP website for a client in the UK.
The locale ID (LCID) is set to 2057, which is as it should be. (I've tested and confirmed it using Response.Write GetLocale
.)
The hosting server is set to UK locale as well.
Recently, we've transferred the website to another server (also with UK settings). Ever since the move, the pages display the date in American format. For example, instead of '16/05/2012,' the page shows '5/16/2012.'
The new server is practically identical to the old one (the old one has gone out of use for technical reasons).
What could be causing the date format to switch back to American format? I'm not sure whether to post this question here, or in server fault.
Upvotes: 2
Views: 2325
Reputation: 1
setlocale only affects scripting engine locale setting. Session.LCID affects scripting engine as well as ASP application
Upvotes: 0
Reputation: 42192
I have been having problems with this a lot, one moment it was ok, the next without any change it was wrong. Guess that IIS remembers the LCID from other pages. I decided to put on top of every asp page where dates are handled the statement "Session.LCID=XXXX" and now i haven't had problems with this for years.
Upvotes: 2