IIS 7 服务器中的日期时间格式问题 [英] Datetime format issue in IIS 7 server
问题描述
我在 IIS 7 WS2008 上托管了我的网站之一.后来我意识到存在一些日期时间格式问题,比如我期待 dd/MM/yyyy 格式的东西,但它是 MM/dd/yyyy 格式,因此它曾经给我日期时间转换错误.
所以我通过以下步骤更改了日期时间格式:
控制面板 -> 区域和语言选项 -> 高级
并更改了注册表项
regedit >> HKEY_USERS>>默认>>控制面板>>国际
这里我们将sLongDate"和sShortDate"键更改为 dd MM yyyy 格式
并重新启动服务器.
现在,问题是如果我创建新网站,我会发现一切正常,包括我的日期时间格式
但是我在进行所有这些日期时间设置更改之前创建的实际网站根本没有任何变化,我仍然面临同样的日期时间问题.
所以我删除了该站点并再次使用相同的 IP 地址和相同的端口托管了相同的站点,但仍然是相同的问题.
那么,是不是有一些特定端口的日期时间配置.
我无法更改端口.
请建议我正确的解决方案.
在此先感谢...
经过大量的寻找,我找到了解决问题的方法:
1) 更改服务器的日期时间格式:
控制面板 -> 区域和语言选项 -> 高级
2) 打开 IIS 并按照以下步骤操作:(适用于 IIS7)
<上一页>- 点击你的网站- 选择 .NET 全球化选项- 从文化选项卡中,选择所需的文化和 UI 文化.- 最后 iisreset.- 完成....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...
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....
这篇关于IIS 7 服务器中的日期时间格式问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!