ASP.NET Web应用程序DateTime.Now问题 [英] ASP.NET Web Application DateTime.Now Problem
本文介绍了ASP.NET Web应用程序DateTime.Now问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好:),
我在美国的服务器上托管了一个网络应用程序。
我的问题是当DateTime.Now调用它在美国检索DateTime.Now,但我希望我的应用程序检索埃及DateTime.Now(因为我所有的用户都在埃及)没有改变任何代码行由另一个意思我想知道是否有这个问题的配置解决方案。
提前谢谢:)
Hi everyone :),
I have a web application that hosted on server in USA.
My problem is when DateTime.Now called it retrieve the DateTime.Now at USA, but i want my application to retrieve the Egypt DateTime.Now (since all my users are in Egypt) without change any line of code by another meaning i want to know if there is a configuration solution to this problem.
Thanks in advance :)
推荐答案
这是由于您的应用程序的文化。默认情况下,它是en-us。查看如何从MSDN:
http ://msdn.microsoft.com/en-us/library/bb882561.aspx [ ^ ]
这个范围更广,但仍然有用!
http://msdn.microsoft.com/ en-us / library / c6zyy3s9(v = vs.100).aspx [ ^ ]
希望这有帮助!
This is due to the "Culture" for your application. By default it is en-us. Check this how to from MSDN:
http://msdn.microsoft.com/en-us/library/bb882561.aspx[^]
This has a broader scope but helpful nevertheless!
http://msdn.microsoft.com/en-us/library/c6zyy3s9(v=vs.100).aspx[^]
Hope this helps!
使用最佳时间+你的时间范围从utc ...像印度5:30 ...
例如:印度:
select getutcdate()+'''5:30''
给出适当的时间印度...... :)
Use ust time + your time range from utc... like india 5:30...
example: for India :
select getutcdate()+''5:30''
give the proper time of india... :)
这篇关于ASP.NET Web应用程序DateTime.Now问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文