Q : Problem With Date Time Display Format

M

Marauderz

Hello guys, got a little question regarding the regional language settings .

Anyway I got a Windows 2003 Server machine that was installed with the date
format "dd/MM/yyyy" and location still locked in US.

As we migrated certain apps over to the new machine. we found out
something... someone coded a Now.ToString in a database query... and the SQL
Box is running MM/dd/yyyy! Chaos follows!!!

I tried setting the Administrator account's date format back to MM/dd/yyyy
under regional and language settings.
I tried logging onto ASPNet user's account and setting the date format to
MM/dd/yyyy but I still can't get Now.ToString to return in an "MM/dd/yyyy
hh:mm tt"

can anyone tell me where I should set the setting?

Thanks!
 
J

Jim Cheshire [MSFT]

Marauderz,

When someone is browsing your application anonymously, there is no
authenticated user. Therefore, there is no profile associated with the
process user at that point. The locale settings in those situations are
read from the .DEFAULT profile on the machine.

You can change the settings for the .DEFAULT profile, but you have to do it
via the Registry.

1) Add the following registry keys with a value of 2
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OLEAUT
VarConversionLocaleSetting = 2 (DWORD)
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters
SetVarConversionLocaleSetting = 2 (DWORD)
2) Make any changes that you would like your web application to use in
your
regional options(locale, short date, etc)
3) Open Regedit and navigate to HKEY_CURRENT_USER\Control
Panel\International
4) Export this key to a file named currentuser.
5) navigate to HKEY_USERS\.DEFAULT\Control Panel\International
6) Export this key to a file named default
7) Open default.reg and currentuser.reg in notepad.
8) Copy the header from the default.reg and paste it over the header in
currentuser.
example:
Default Currentuser
before
[HKEY_USERS\.DEFAULT\Control Panel\International]
[HKEY_CURRENT_USER\Control Panel\International]
after
[HKEY_USERS\.DEFAULT\Control Panel\International]
[HKEY_USERS\.DEFAULT\Control Panel\International]
9) Save default.reg.
10) Merge it into the registry.
11) Restart IIS.

This should ensure that the date formats are pulled from the .DEFAULT
profile always. You can change these values in the future by following
these steps.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.


--------------------
 
M

Marauderz

Thanks for the suggestion... but it doesn't seem to work...
Any other suggestions, I need a MM/dd/yyyy short date, maybe you could
prepare a reg file for me that does the changes?
Basically I need a US date display.

The programmer that wrote SQL Injectable code is being flogged as I type. ;)

Thanks.

Jim Cheshire said:
Marauderz,

When someone is browsing your application anonymously, there is no
authenticated user. Therefore, there is no profile associated with the
process user at that point. The locale settings in those situations are
read from the .DEFAULT profile on the machine.

You can change the settings for the .DEFAULT profile, but you have to do it
via the Registry.

1) Add the following registry keys with a value of 2
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OLEAUT
VarConversionLocaleSetting = 2 (DWORD)
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters
SetVarConversionLocaleSetting = 2 (DWORD)
2) Make any changes that you would like your web application to use in
your
regional options(locale, short date, etc)
3) Open Regedit and navigate to HKEY_CURRENT_USER\Control
Panel\International
4) Export this key to a file named currentuser.
5) navigate to HKEY_USERS\.DEFAULT\Control Panel\International
6) Export this key to a file named default
7) Open default.reg and currentuser.reg in notepad.
8) Copy the header from the default.reg and paste it over the header in
currentuser.
example:
Default Currentuser
before
[HKEY_USERS\.DEFAULT\Control Panel\International]
[HKEY_CURRENT_USER\Control Panel\International]
after
[HKEY_USERS\.DEFAULT\Control Panel\International]
[HKEY_USERS\.DEFAULT\Control Panel\International]
9) Save default.reg.
10) Merge it into the registry.
11) Restart IIS.

This should ensure that the date formats are pulled from the .DEFAULT
profile always. You can change these values in the future by following
these steps.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.


--------------------
From: "Marauderz" <[email protected]>
Subject: Q : Problem With Date Time Display Format
Date: Mon, 19 Jul 2004 09:36:10 +0800
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 210.187.6.69
Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13
phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:247991
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hello guys, got a little question regarding the regional language
settings
 
J

Jim Cheshire [MSFT]

Marauderz,

I don't have a .reg file to send you. You will need to make those
modifications yourself.

You do want to make sure that the Registry keys you create for OLEAUT are
DWORD values.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
From: "Marauderz" <[email protected]>
References: <#[email protected]>
Subject: Re: Q : Problem With Date Time Display Format
Date: Tue, 20 Jul 2004 02:19:44 +0800
Lines: 87
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
Message-ID: <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 219.95.131.217
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:248183
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Thanks for the suggestion... but it doesn't seem to work...
Any other suggestions, I need a MM/dd/yyyy short date, maybe you could
prepare a reg file for me that does the changes?
Basically I need a US date display.

The programmer that wrote SQL Injectable code is being flogged as I type. ;)

Thanks.

Jim Cheshire said:
Marauderz,

When someone is browsing your application anonymously, there is no
authenticated user. Therefore, there is no profile associated with the
process user at that point. The locale settings in those situations are
read from the .DEFAULT profile on the machine.

You can change the settings for the .DEFAULT profile, but you have to do it
via the Registry.

1) Add the following registry keys with a value of 2
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\OLEAUT
VarConversionLocaleSetting = 2 (DWORD)
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\InetInfo\Parameters
SetVarConversionLocaleSetting = 2 (DWORD)
2) Make any changes that you would like your web application to use in
your
regional options(locale, short date, etc)
3) Open Regedit and navigate to HKEY_CURRENT_USER\Control
Panel\International
4) Export this key to a file named currentuser.
5) navigate to HKEY_USERS\.DEFAULT\Control Panel\International
6) Export this key to a file named default
7) Open default.reg and currentuser.reg in notepad.
8) Copy the header from the default.reg and paste it over the header in
currentuser.
example:
Default Currentuser
before
[HKEY_USERS\.DEFAULT\Control Panel\International]
[HKEY_CURRENT_USER\Control Panel\International]
after
[HKEY_USERS\.DEFAULT\Control Panel\International]
[HKEY_USERS\.DEFAULT\Control Panel\International]
9) Save default.reg.
10) Merge it into the registry.
11) Restart IIS.

This should ensure that the date formats are pulled from the .DEFAULT
profile always. You can change these values in the future by following
these steps.

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
Microsoft Developer Support
(e-mail address removed)

This post is provided "AS-IS" with no warranties and confers no rights.


--------------------
From: "Marauderz" <[email protected]>
Subject: Q : Problem With Date Time Display Format
Date: Mon, 19 Jul 2004 09:36:10 +0800
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
Message-ID: <#[email protected]>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 210.187.6.69
Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp1 3
phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:247991
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hello guys, got a little question regarding the regional language
settings
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top