473,659 Members | 2,663 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

regional settings inconsistency

Hi,

I have done a lot of reading before doing this posting, but I just can't
find a solution that makes sense.

eg http://support.microsoft.com/default.aspx/kb/306044 - Behavior of
Date/Time format differs when accessed from Active Server Pages
and http://support.microsoft.com/kb/264063/ - VBScript Date and Time
Functions May not be Formatted Properly in Non-English (US) Locales

I have a production ASP based website running on Windows2000 server. I am
trying to migrate it to another Windows2000 server manually. All is working
except the regional settings. I have checked the HKEY_USERS\.DEF AULT\Control
Panel\Internati onal settings and they are the same between servers. But when
I run the application the use of now() in the vbscript is giving the wrong
date format. I am at a complete loss. Everything I have read points me to
this registry setting being used by IIS for getting the regional settings,
but it is not working.

If it were a new application I would just be more explicit and use datepart
to put together the values I require, but this application has been running
successfully for over 4 years and I am afraid I will miss somewhere and it
will not be found for a long while.

Can anyone suggest where else I should check, eg somewhere in the IIS setup,
in order to fix this problem.

Is it possible there is some patch I might be missing after Win2000 Service
Pack 4 that addresses this?

Thanks in advance
Janette
Jul 17 '06 #1
6 2045
Just another curious addition. I coded

response.write( getlocale())

into a page and got the result 1033, where it should be 3081 according to
the registry setup.

I then coded

setlocale(3081)
response.write( getlocale() & "<br>")
response.write( now())

and now() still gives the 1033 format. I was sure this should have fixed it.

Very confused
Janette
"Janette" <ni**@community .nospamwrote in message
news:uR******** ******@TK2MSFTN GP05.phx.gbl...
Hi,

I have done a lot of reading before doing this posting, but I just can't
find a solution that makes sense.

eg http://support.microsoft.com/default.aspx/kb/306044 - Behavior of
Date/Time format differs when accessed from Active Server Pages
and http://support.microsoft.com/kb/264063/ - VBScript Date and Time
Functions May not be Formatted Properly in Non-English (US) Locales

I have a production ASP based website running on Windows2000 server. I am
trying to migrate it to another Windows2000 server manually. All is
working except the regional settings. I have checked the
HKEY_USERS\.DEF AULT\Control Panel\Internati onal settings and they are the
same between servers. But when I run the application the use of now() in
the vbscript is giving the wrong date format. I am at a complete loss.
Everything I have read points me to this registry setting being used by
IIS for getting the regional settings, but it is not working.

If it were a new application I would just be more explicit and use
datepart to put together the values I require, but this application has
been running successfully for over 4 years and I am afraid I will miss
somewhere and it will not be found for a long while.

Can anyone suggest where else I should check, eg somewhere in the IIS
setup, in order to fix this problem.

Is it possible there is some patch I might be missing after Win2000
Service Pack 4 that addresses this?

Thanks in advance
Janette

Jul 17 '06 #2
Hello Janette,

In Control panel\regional and language Options, you may change the locale
and Date Time format here. After the changes, you may perform a reboot and
test your ASP page again, will it give correct result after this?

Sincerely,

Luke Zhang

Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 17 '06 #3
Hi Luke,

Firstly, the settings are correct in the control panel/regional and
langauage Options, but yes I have tried this, tried rebooting and stopping
and starting IIS and have had no change.

Regards
Janette

"Luke Zhang [MSFT]" <lu******@onlin e.microsoft.com wrote in message
news:Qv******** ******@TK2MSFTN GXA01.phx.gbl.. .
Hello Janette,

In Control panel\regional and language Options, you may change the locale
and Date Time format here. After the changes, you may perform a reboot and
test your ASP page again, will it give correct result after this?

Sincerely,

Luke Zhang

Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 17 '06 #4
Hello Janette,

In you test code:

setlocale(3081)
response.write( getlocale() & "<br>")
response.write( now())
If you replace the "setlocale(3081 )" with :

Session.LCID = 3081

With this give correct output for date time string?

Sincerely,

Luke Zhang

Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 18 '06 #5
Hi Luke,

I tried using Session.LCID = 3081 and it works. I still don't understand
1. Why Session.LCID works and setlocale(3081) doesn't
2. Why I need to set Session.LCID = 3081 at all when this code on my old
server correctly picked up the server default for the locale.

Anyway, thanks, I will just have to run with this solution for now, as I
have no alternative.
Regards
Janette
"Luke Zhang [MSFT]" <lu******@onlin e.microsoft.com wrote in message
news:Rq******** ******@TK2MSFTN GXA01.phx.gbl.. .
Hello Janette,

In you test code:

setlocale(3081)
response.write( getlocale() & "<br>")
response.write( now())
If you replace the "setlocale(3081 )" with :

Session.LCID = 3081

With this give correct output for date time string?

Sincerely,

Luke Zhang

Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 18 '06 #6
Hello Janette,

Based on my experience, Session.LCID is right working way in an ASP page;
setlocale() is intend to work in VBScript application. For example, a .vbs
file.

Sincerely,

Luke Zhang

Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 19 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
10036
by: Grumfish | last post by:
Is there a way to tell Java what localization to use so applications and the compiler doesn't default to the system's setting? I'm using a computer with Windows 2000 with a regional setting of Japanese. Is there any way to have Java always use US English rather than the default Japanese?
1
7159
by: nerman | last post by:
Hello I have a problem with the regional settings. I have set the regional settings of the web server to display the numbers in this format 123.456,78 But when I open my web site all number are diplayed with the old format which is 123,456.78 I changes also the regional setting of my computer but it does not work any ideas Thank Nere
4
15840
by: Jonathan | last post by:
Dear All, I am trying to set a webserver to use French regional settings for testing ASP pages. According to http://support.microsoft.com/kb/q306044, for IIS5, this is a matter of changing the regional settings for the authenticated user, and if this user does not have a user profile then the default regional settings. Unfortunately, this does not seem to be working in IIS6, in that I have
2
4549
by: Bob Dydd | last post by:
Hi Everbody Question Changing the regional settings ie. from UK to US AUS etc, Access retains the original currency format that the application was created in. So if an mdb that is written on a computer with Regional Settings Currency Format set to UK £'s , when that mdb is open on a machine
3
12401
by: Emmanuel | last post by:
I want to know the decimal separator and the group separator character that the user has set in Regional Settings in Control Panel. I tryied to use System.Globalization.NumberFormatInfo.CurrentInfo like that: NumberFormatInfo numInfo = System.Globalization.NumberFormatInfo.CurrentInfo; string ds = numInfo.CurrencyDecimalSeparator; string gs = numInfo.CurrencyGroupSeparator;
1
2374
by: John | last post by:
Hi, The following behavior when using J# vs. C# is really bothering me. When I have the regional settings on my workstation set to a non-US settings (eg: Danish); it seems that J# disregards the regional settings. Where-as C# automatically picks up the regional settings and applies them. For example, the following J# code: public static void main(String args)
12
9123
by: magister | last post by:
Hello, I know I can set the Culture to what I want, but shouldn't the current culture be taken from the regional settings on the web server's control panel!!! Mine is set to "united kingdom" but in my asp.net page I do
7
12625
by: Fred Flintstone | last post by:
I'm writing a VB.Net windows forms application. This line of code: Personal.EffectiveDate = GridRow2.Cells("New Value").Value.ToString.Trim Fails with this error: Cast from string "8/23/2005" to type 'Date' is not valid. The date being returned is in US English and my system is set for
16
2920
by: Colmag | last post by:
I've written an application with vb.net 2003 (framework 1.1) which automates a 3rd party viewing/printing application (via an activex control). I've released several versions over the last year without problem, but since getting a new laptop, people can't run the program since I built it with the new machine. Even if I take the modified code and build it with my old machine, it still crashes. I thought maybe it was the code, but it...
0
8330
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8746
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6178
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2749
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.