IIS time format setting problem (ASP.net date format is wrong)

  
IIS time format adjustment: Since installing XP in Tomato Garden, I found a lot of problems. First of all, several local sites are not working properly, and the error message is a time format error. Can you not do it now? Looked at it, it seems to be an additional "morning /afternoon" string. The relevant information found on the network is as follows: Modify the registry 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 it is Create a) Create a DWORD value under the key VarConversionLocaleSetting = 2 Note: The DWORD value is called "double-byte value" in the Chinese registry editor. "Restart the computer after the operation...OK." Other: Why is this DWORD value 2? In fact, he has 0, 1, 2 values ​​0 - the default value is the current value. 1 - Defaults to the system defaults in the HKEY_USERS".default"Control Panel"International Registry hive. If your system date format is not standard, it is still equivalent to the current value. 2 - This format is forced to use the system default locale. I have tried it, the above method will not work. I don't know if I didn't understand the essence. I remembered that I used the optimization master before, and added the words such as “Learning to learn” in front of the date. Is it possible to solve this problem in the optimization master? In the personality settings, delete “ AM /PM & rdquo;, restart. Or not. But I still got it all the time, otherwise I wouldn’t say a bunch of nonsense. “Control Panel>- “Date, Time, Language, and Regional Settings>- “Change the format of numbers, dates, and times> – “Regional Options”- “Customize” – Time Time format: HH:mm:ss (What do you mean, above) Date format: yyyy-Md You can try changing to other formats to see the effect. The following code is used to detect the format specification or not. IIS time format verification script: <!----Test Time Begin----> <% tnow = now(): oknow = cstr(tnow) if oknow <> year(tnow) & " ;-" & month(tnow) & "-" & day(tnow) & " " & hour(tnow) & ":" & right(FormatNumber(minute( Tnow)/100,2),2) & ":" & right(FormatNumber(second(tnow)/100,2),2) then oknow = oknow & " (date format is not standardized)" ; %> Server time: <%=oknow%> <!----Test Time End----> ------------------- ----------------------- I encountered this problem again and found it after testing. The above is invalid by setting in "Date, Time, Language, and Regional Settings". Use 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, it will be OK. Restart IIS: Start - Run net stop iisadmin iisreset
Copyright © Windows knowledge All Rights Reserved