IIS 7服务器中的日期时间格式问题 [英] Datetime format issue in IIS 7 server

查看:97
本文介绍了IIS 7服务器中的日期时间格式问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在IIS 7,WS2008上托管了我的一个站点。后来我意识到有一些日期时间格式问题,比如我期待dd / MM / yyyy格式的东西,但它是MM / dd / yyyy格式,因此它曾经给我日期时间转换错误。

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

并更改了注册表项

regedit >> HKEY_USERS >> DEFAULT >>控制面板>>国际

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

此处我们更改了sLongDate和sShortDate键,以dd MM yyyy格式

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

重新启动服务器。

现在,问题是,如果我创建新网站,我会发现一切正常,包括我的日期时间格式

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.

所以我删除了该网站,并使用相同的IP地址和相同的端口再次托管了同一网站,但仍然存在同样的问题。

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.

我无法改变我的端口。

请建议我找到合适的解决方案。

Please suggest me proper solution.

提前致谢...

推荐答案

经过多次打猎我找到了问题的解决方案:

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

1)更改服务器的日期时间格式:

1) Change the datetime format of your server from:

控制面板 - >区域和语言选项 - >高级

2)打开IIS并按照以下步骤操作:(适用于IIS7)

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆