?
Solved

ASP/VBScript regional settings issue

Posted on 2003-03-06
4
Medium Priority
?
362 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

743 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