ASP VBScript UK Date Format Default

I want my ASP vbscript functions to always return dd/MM/yyyy british formats by default.

I have a page with the following code
<%
  response.write now()
%>
Sometimes it returns 11/6/2003 11:17:55 AM and sometimes 06/11/2003 11:17:42 (I also get the same scenario with currencies switching between £ and $ which suggests to me IIS switching Regional Settings). I can have the same page opened in separate browser windows within seconds of each other showing the different formats.

I have sifted through newsgroups for help, these are the things I have tried to no avail
*  The registry key HKEY_USERS/.Default/Control Panel/International is set correctly  (I understand that IUSR | IWAM account uses this)
* I remotely log on as Administrator. My regional settings are UK English, The Set Default is UK English (although it was US English).
* There are two other profiles under HKEY_USERS/ both of these have UK settings, as is the case with HKEY_CURRENTUSER
* I added a key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OLEAUT
VarConversionLocaleSetting = 2  and HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters SetVarConversionLocaleSetting = 2  which should force IIS to use system default Regional Settings

I have since rebooted, yet still the problem persists. I have even explicity set the Session.LCID = 2057 in the global.asa session and application startup events. However, I don't want a coding solution as I don't see why it should require one.

Server config is Windows2000 Advanced Server, Service Pack 4. IIS version 5.0

macdpaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

fritz_the_blankCommented:
YOu might want to consider using the LCID code at the top of your page:

http://www.webwizguide.info/asp/faq/date_time_settings.asp

Fritz the Blank
0
macdpaAuthor Commented:
I have already tried using the Session.LCID = 2057 as follows in the global.asa to no effect

<SCRIPT LANGUAGE="VBScript" RUNAT="Server">

Sub Session_OnStart
      Session.LCID = 2057
End Sub

</SCRIPT>

Having it in the actual page does seem to have the desired effect. However as I stated in the original post, I wasn't wanting after a coding solution here. Perhaps its better suited to the IIS area ?
0
turbosigCommented:
on your server, go to control panel --> regional date & time / language options (syntax will depend on your OS).

Change it there.  Then it will always be in UK format.

remember though, if someone from let's say the US is on the site and you have text fields where they type in the "date" you will have to take this into acount.
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

macdpaAuthor Commented:
This was the very first thing that I checked. As I say above I can only log on remotely (and do so as Administrator). Going through the control panel Regional Settings Dates are set as UK based.

I understand however, that IIS authenticates a web user as using the IUSR_ and/or IWAM_ accounts, and therefore I thought perhaps these accounts were set up with different regional settings. As these aren't real accounts you can't actually log in to these account and change their regional settings in the control panel like a normal user. So how do I check the regional Settings for these accounts ? As well as HKEY_USERS/.Default/Control Panel/International I checked the two other profiles that existed in the registry under the HKEY_USERS/ hive, they both have UK dates and locales settings specified.

 
0
fritz_the_blankCommented:
I know that it wasn't what you wanted, but hey, if it works....

The idea is that IIS could serve many sites geared to different regions, so what you have in your control panel regional settings will not pertain.

I am at a loss as to why doing this in the global.asa  does not do it--for whatever reason, it appears that the pages don't inherit that property setting.

FtB
0
macdpaAuthor Commented:
That makes two of us, as soon as this problem came to my attention I went through and did the alterations to the global.asa in all the websites on the server. If I can help it I wish to avoid having to edit all the inidividual pages of all the websites affected.

We never use to have this problem it just appeared one day.

Paul.
0
fritz_the_blankCommented:
>>If I can help it I wish to avoid having to edit all the inidividual pages of all the websites affected.<<

Boy, oh boy, do I hear you!

I generally have header and footer include files on my pages. That way, if I need a global change, I can just make one modification.

It is a strange thing, and I can't speak with authority here, but it seems that global.asa files can interfere with each other when you have a main site with a series of virtual directories under it.

By and large, this is why I rarely use the global.asa--the Session  On End has never worked well, and most of what I want to do with the Session On Start can be done with an include file.

FtB

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vnvkCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    Accept: fritz_the_blank {http:#9716579}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

vnvk
EE Cleanup Volunteer
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.