Problem of calling function now () exception in ASP program

Source: Internet
Author: User
Tags date format iis locale time and date
A new server has emerged: in an ASP program, the Call function now () is always displayed in the form of "2009-07-12 08:12:56", which always shows "morning" and "PM", and the resolution process and the Final solution are as follows:
  1. This shows, generally because the server is so set, first look at the time format: directly double-click the task bar in time, in the pop-up "time and date" in the morning really shows the word, then enter the next step to set;
  2. Open the Control Panel, select Regional and Language Options, select Custom in Regional Options, select the Time tab, set the time format to "H:MM:SS"-24-hour time, empty the following AM symbol and PM symbol values, and click OK to save the settings;
  3. At this point again open "time and date", the time has not shown the words of the morning and afternoon, into the next test;
  4. After restarting IIS, execute ASP function now (), the result let me be very disappointed, or show big "Afternoon" two words, that is not the problem, should be not using the system locale time;
  5. Force ASP time to use the time format inside the locale by using the following method: Open Registry Editor, enter HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\, set up OleAut, under which the name " Varconversionlocalesetting "DWORD value, set data to 2, exit Registry Editor after Setup completes;
  6. After restarting IIS, test the ASP function again now (), it has been successful to no longer show the damn "Morning" "Afternoon" words.


Related Article

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.