473,382 Members | 1,814 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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\.DEFAULT\Control
Panel\International 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 2027
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**************@TK2MSFTNGP05.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\.DEFAULT\Control Panel\International 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******@online.microsoft.comwrote in message
news:Qv**************@TK2MSFTNGXA01.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******@online.microsoft.comwrote in message
news:Rq**************@TK2MSFTNGXA01.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
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...
1
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...
4
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...
2
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...
3
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...
1
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...
12
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"...
7
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...
16
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.