Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

ASP/VBScript regional settings issue

Posted on 2003-03-06
4
Medium Priority
?
370 Views
Last Modified: 2010-07-27
I know there is a problem with VBScript on in ASP/IIS that caused your script environment to inherit default regional settings from the last user that was logged on to the webserver etc.

Currently we bypassed this problem by making sure that all users and the default-rpofile on the system had the same regional settings.

Still when a new user is created it happens these settings are not properly set, which then starts causing problems in the application, which then requires manual intervention etc etc.

I'm wondering how other experts (you) are dealing with this particular problem when using VBScript (don't say use JScript :))
Did you write your own FormatDateTime routines, or do you use a fixed Locale by using the SetLocale() function, or did you find another way around ?

I would be glad to hear your solution(s).

0
Comment
Question by:newjack
  • 2
4 Comments
 

Expert Comment

by:coreo
ID: 8080707
We tried using SetLocale(), but found we still had problems.  Ended up having to write our own FormatDate functions.

And we also test for what the current locale is set to (it's only even UK or USA) by using:

if left(CDate("31/12/2002"), 2) = "31" then
  Session("LocaleDateFormat") = "DD/MM/YYYY"
else
  Session("LocaleDateFormat") = "MM/DD/YYYY"
end if
0
 
LVL 3

Author Comment

by:newjack
ID: 8086663
I suppose that session variable LocalDateFormat isn't something you can use with existing VBScript functions.
I can't think of any functions that can use a format like that, so I'm guessing you wrote your own functions to format and parse dates for input/output?

0
 

Accepted Solution

by:
coreo earned 400 total points
ID: 8089310
Yes, we had to write functions that took either a date or string and formatted them the way we wanted them.  And to perform operations like DateAdd, etc.
0
 
LVL 58

Expert Comment

by:Gary
ID: 9352823
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept Answer by coreo

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
GaryC123
EE Cleanup Volunteer
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question