How to set Date and time format in IIS 7

前端 未结 9 1145
春和景丽
春和景丽 2020-12-02 18:31

I have date format in my local machine : (d/M/yyyy h:mm tt) ==> (23/6/2011 4:30 PM)

when i publish my website on IIS server it converts date format to (M/d/yyyy H:mm

相关标签:
9条回答
  • 2020-12-02 19:10

    Please try the below steps.Its works for me

    1. Check app pool of your application in IIS.
    2. Go to Application pool of your website and change Identity of that pool to local service(because your desired date format you have set is in your local system) in Advance setttings.
    3. Restart your app in IIS
    0 讨论(0)
  • 2020-12-02 19:11
    - Open IIS 7
    - Select your website
    - Open .NET GLOBALIZATION
    - From Culture tab, select required Culture and UI Culture.
    - Do iisreset
    
    0 讨论(0)
  • 2020-12-02 19:13

    I was having the same problem, I just found a solution, you need to change the key on the server, follow this steps:

    • Go into Registry Editor (start -> run -> type regedit).
    • Get into the folder HKEY_USERS -> .DEFAULT -> Control Panel -> International.
    • Look for the key sShortDate, right click -> Modify...
    • Change the Value data for d/M/yyyy.
    • Log off. Then next time you log in, dates should be work as you wanted.

    That should do the trick, you can also change the sLongDate.

    0 讨论(0)
  • 2020-12-02 19:14

    Even after setting application locale it was still picking up the application pool users locale. I had to change the region settings for all users. This screen shot might help...

    1. Change System Locale
    2. Change Region Settings to desired

    0 讨论(0)
  • 2020-12-02 19:19
    • Go to Control Panel
    • Click Region and you will see a screen with 3 tabs (Formats, Location and Administrative)
    • Click Formats and choose the settings you prefer
    • Click Location and choose the settings you prefer
    • Click Administrative tab. For "Welcome screen and new user accounts", click copy settings. From the new window, click both checkboxes for 'welcome screen and system accounts' and 'new user accounts' (if you skip this step, you will still see the issue because IIS uses system account)
    • Approve all changes for Region by clicking Ok on all open windows
    • Open Command prompt, write iisreset and enter
    • If you still don't see the changes try logoff and logon
    0 讨论(0)
  • 2020-12-02 19:22

    Try to put this line in the system.web of the web.config, modify the data of culture to your country.

    <globalization uiCulture="es-CO" culture="es-CO" enableClientBasedCulture="false" />
    
    0 讨论(0)
提交回复
热议问题