Datetime format issue in IIS 7 server

我的未来我决定 提交于 2019-11-29 09:57:54

问题


I have hosted one of my site on IIS 7, WS2008. Later i have realize there is some datetime format issue, like me expecting things in dd/MM/yyyy format but it was in MM/dd/yyyy format and because of this it used to give me datetime conversion error.

So i have changed the datetime format by following step:

Control Panel -> Regional and Language Options -> Advanced

and changed registry entry

regedit >> HKEY_USERS>>DEFAULT>>Control Panel>>International

and here we have changed "sLongDate" and "sShortDate" key in dd MM yyyy format

and restarted the server.

Now, the issue is if i create new website i'll found everything is working fine including my datetime format as well

But my actual site which i have created before making all these datetime setting changes is having no change at all, still i m facing same datetime issue.

So i have deleted that site and hosted same site again with same IP address and at same port, but still same issue.

So, is it like there is some configuration of datetime for specific port.

I can not change my port.

Please suggest me proper solution.

Thanks in Advance...


回答1:


After lot's of hunt i have found the solution of my problem:

1) Change the datetime format of your server from:

Control Panel -> Regional and Language Options -> Advanced

2) Open IIS and follow below steps: (For IIS7)

- Click on you Website
- Select .NET GLOBALIZATION option
- From Culture tab, select required Culture and UI Culture.
- Finally iisreset.
- Dones....



回答2:


Change in registry entry

regedit >> HKEY_USERS >> DEFAULT >> Control Panel >> International

and we have changed "sLongDate" and "sShortDate" key in dd MM yyyy format

and restart server.




回答3:


  1. Change the datetime format of your server from:

    Control Panel -> Regional and Language Options -> Advanced

  2. Open IIS and follow below steps: (For IIS7)

    • Click on you Website
    • Select .NET GLOBALIZATION option
    • From Culture tab, select required Culture and UI Culture.
    • Finally iisreset.
    • Dones....

This Answer posted by Sham worked for us. We were upgrading the server and there were no changes in application or DB but after upgrade we got string format issue for date time. Above suggestion helped me...



来源:https://stackoverflow.com/questions/11237765/datetime-format-issue-in-iis-7-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!