Home All Groups Group Topic Archive Search About

regional settings inconsistency



Author
17 Jul 2006 4:59 AM
Janette
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

Author
17 Jul 2006 5:43 AM
Janette
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


Show quote
"Janette" <ning@community.nospam> wrote in message
news:uRRVQ3VqGHA.4684@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
>
Author
17 Jul 2006 6:42 AM
Luke Zhang [MSFT]
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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Author
17 Jul 2006 10:49 PM
Janette
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



Show quote
"Luke Zhang [MSFT]" <lukez***@online.microsoft.com> wrote in message
news:QvG3gwWqGHA.6120@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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
>
Author
18 Jul 2006 7:17 AM
Luke Zhang [MSFT]
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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Author
18 Jul 2006 10:25 PM
Janette
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


Show quote
"Luke Zhang [MSFT]" <lukez***@online.microsoft.com> wrote in message
news:RqTjFpjqGHA.2024@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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
> ==================================================
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
>
Author
19 Jul 2006 8:11 AM
Luke Zhang [MSFT]
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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
==================================================

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

AddThis Social Bookmark Button