Network Service date format problem - British vs US

  • Thread starter Thread starter JimLad
  • Start date Start date
J

JimLad

Hi,

We've reinstalled our 2003 server using British date format dd/MM/
yyyy.

We are using Network Service account in our app pool. I wrote a test
program to check the date format and it is using US date format MM/dd/
yyyy. If I switch the app pool to the local system account then
British dates are used correctly.

My support team say the Network Service account date format can't be
changed. Please tell me they are wrong?

BTW - this is to support a legacy program that passes mutable date
strings around. I would of course not do this for a new program.

Cheers,

James
 
Of course they are wrong.:)

You can change it using API calls as well but the easiest thing is to
copy the settings from HKEY_USERS\.DEFAULT\Control Panel\International
to HKEY_USERS\S-1-5-20\Control Panel\International.

Also note that if your are using .NET Framework then you can configure
your app to use British locale using <globalization culture="en-GB" />

See http://msdn.microsoft.com/en-us/library/hy4kkhe0.aspx

Kornél
 
Hello JimLad,
Hi,

We've reinstalled our 2003 server using British date format dd/MM/
yyyy.

We are using Network Service account in our app pool. I wrote a test
program to check the date format and it is using US date format MM/dd/
yyyy. If I switch the app pool to the local system account then
British dates are used correctly.

My support team say the Network Service account date format can't be
changed. Please tell me they are wrong?

BTW - this is to support a legacy program that passes mutable date
strings around. I would of course not do this for a new program.

Instead of trusting the account to have the correct settings (it get's even
worse if multiple websites on your server use the same App Pool), you can
specify the settings in your web.config. These will be application specific
and will override the account settings.

See http://msdn.microsoft.com/en-us/library/hy4kkhe0.aspx for more information...
 
Of course they are wrong.:)

You can change it using API calls as well but the easiest thing is to
copy the settings from HKEY_USERS\.DEFAULT\Control Panel\International
to HKEY_USERS\S-1-5-20\Control Panel\International.

Also note that if your are using .NET Framework then you can configure
your app to use British locale using <globalization culture="en-GB" />

Seehttp://msdn.microsoft.com/en-us/library/hy4kkhe0.aspx

Kornél








- Show quoted text -

Many thanks Kornél. That has confirmed my thoughts.

Should I change S-1-5-19 LocalService as well?

This is for a server move so I will use the registry hack/change you
suggest.

This confirms what I read at the following post:
http://www.techtalkz.com/windows-server-2003/39724-change-profile-used-network-service.html

I'll just write 'regional settings' here so other people can find this
post. :-)

Cheers,

James
 
Hello JimLad,






Instead of trusting the account to have the correct settings (it get's even
worse if multiple websites on your server use the same App Pool), you can
specify the settings in your web.config. These will be application specific
and will override the account settings.

Seehttp://msdn.microsoft.com/en-us/library/hy4kkhe0.aspxfor more information...

Hi Jesse,

Thanks. I will use this in future. However to support the legacy apps
it's simplest to change the default as well.

Many thanks,

James
 
Hi Jesse,

Thanks. I will use this in future. However to support the legacy apps
it's simplest to change the default as well.

Many thanks,

James- Hide quoted text -

- Show quoted text -

http://support.microsoft.com/kb/243330/en-us

This shows the various security identifiers. The most relevant are:

SID: S-1-5-18
Name: Local System
Description: A service account that is used by the operating system.

SID: S-1-5-19
Name: NT Authority
Description: Local Service

SID: S-1-5-20
Name: NT Authority
Description: Network Service
 
Back
Top