IIS Time format settings

Source: Internet
Author: User

IIS Time Format adjustment:

(resolved) today when using IIS7 to find a question about the time format, when I use the now () time function in ASP, the date is separated by "/", rather than "-" to separate, so that I run the program when the old error, and then after the study finally found solution method.

The operating system I am using here is Winodws Vista Ultimate Service Pack 1, and the result of using the now () time function in ASP is as follows:

2009/3/17 8:11:51

And I want the result is 2009-3-17 8:11:51, do not know why in the IIS7 time format to/to distinguish, if there is a master know please leave a message, but finally I modified the registry method to solve the problem, the method is as follows:

1. Start → run → enter regedit, open the Registry Editor, and then click Find Hkey_users\. DEFAULT\Control Panel\International

2. Find the Sdate entry in the right window, change its value to-; Find the Sshortdate key, and change its value to yyyy-m-d.

3. Restart IIS, start → run → input iisreset

The following methods are not resolved:

It's been a lot of problems since I installed XP in tomato garden.

First, several local sites do not work properly, prompting the error message is a time format error. Can we not do it now? Looked at it as if it were more than a "morning/Afternoon" string.

The network found the relevant information as follows:

Modify the Registration Form

hkey_users/. Default/control panel/international

Hkey_current_user/control panel/international

Itime = 1

The corresponding key value is Hkey_local_machine/software/microsoft/oleaut (OleAut may not exist, then create one yourself)

Create a DWORD value under this key varconversionlocalesetting = 2

Note: DWORD value is called "Double-byte value" in the Chinese Registry Editor.

Restart computer after operation ... Ok.

Other: Why is this DWORD value 2? Actually, he has a 0,1,2 value.

0-The default value, which is the current value.

1-defaults to the system default settings in the Hkey_users/.default/control Panel/international registry hive, which is equivalent to the current value if your system date format is no longer standard.

2-This format is forced to use the system default locale.

Tried, the above methods are not. I do not know whether I did not understand the essence of them.

Think of yourself before using the optimization master, before the date added such as "good study" words, is not in the optimization master can also solve this problem?

Delete "morning/Afternoon" in Personality settings and restart.

It's still not working.

But I still got it, otherwise I wouldn't have said a bunch of crap.

Control Panel-date, time, language, and locales-change the format of numbers, dates, and times – Regional Options-Custom – time

Time format: HH:MM:SS (Specific what meaning, above)

Date format: yyyy-m-d

You can try different formats to see the effect. The following code is used to detect the format specification or not.

IIS time Format validation script:

<!----Test time Begin---->

<%

Tnow = Now (): Oknow = CStr (Tnow)

If Oknow <> year (tnow) & "-" & Month (Tnow) & "-" & Day (Tnow) & "& Hour (Tnow) &": "&A mp Right (FormatNumber (minute (Tnow)/100,2), 2) & ': ' & Right (FormatNumber (second (tnow)/100,2), 2) Then Oknow = Oknow & "(date format not canonical)"

%>

Server time: <%=oknow%>

<!----Test time End---->

------------------------------------------

2006.09.06

Once again encountered this problem, after testing, found. The above is not valid by setting it in "date, time, language, and locale".

Using the above mentioned:

The corresponding key value is Hkey_local_machine/software/microsoft/oleaut (OleAut may not exist, then create one yourself)

Create a DWORD value under this key varconversionlocalesetting = 2

Restart IIS and it will be OK.

To restart IIS:

Start-run

net stop IISAdmin

IISReset

Top
0
Step

IIS Time format settings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.