日期格式在asp.net与控制台应用程序 [英] date format in asp.net versus in console application
本文介绍了日期格式在asp.net与控制台应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在控制台应用程序中,值
DateTime.Today。 ToLongDateString();
是
2009年12月10日
而在Web应用程序中,值为
23ذوالحجة1430<相当于高级日历
Web应用程序如何获取文化,为什么它不同于控制台应用程序?
解决方案
我得到了答案!它是可能是ASPNET或IIS的用户的注册表记录之一。通过使用注册表,i。在用户中的一个发现国际=阿拉伯
由于:
更改默认区域在IIS 6.0
I'm deploying a .NET applications to another machine.
in console application, the value of
DateTime.Today.ToLongDateString();
is
10 December 2009
while in web application the value is
23 ذو الحجة 1430 < equivalent in higri calendar
How does the web application get the culture from, and why is it different than the console application?
解决方案
I got the answer! it was one of the registry records of the users of probably ASPNET or IIS. by using regedit, i found in one of the users international = arabic
Thanks to: Change Default Locale in IIS 6.0
这篇关于日期格式在asp.net与控制台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文