如何在asp.net 2.0应用程序中设置默认时区? [英] How do I set default time zone in asp.net 2.0 application?

查看:72
本文介绍了如何在asp.net 2.0应用程序中设置默认时区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在印度主办了我的应用程序,共享主机和我们的客户在爱尔兰使用它。我想将我的应用程序默认时区设置为与爱尔兰相同。我怎么能这样做?

我是这个话题的新手。

请在此建议。



谢谢

I have hosted my application in India with shared hosting and our client using it from Ireland. I want to set my application default time zone to same as of Ireland. How could I do this?
I am new to this topic.
Please suggest on this.

Thanks

推荐答案

你需要在应用程序级别设置文化。您可以在全球化节点中的web.config文件中执行此操作。有关如何执行此操作的详细信息,请参阅此文章 - 如何:在没有代码的ASP.NET应用程序中设置文化信息 [ ^ ]。



希望有所帮助!
You will need to set the culture at application level. You can do that in web.config file in globalization node. For more details on how to do it, please refer this article - HOW TO: Set Culture Information in an ASP.NET Application Without Code[^].

Hope that helps!


将文化信息设置为美国格式



IFormatProvider theCultureInfo = new System .Globalization.CultureInfo(en-US,true);
set the culture info as US format

IFormatProvider theCultureInfo = new System.Globalization.CultureInfo("en-US", true);


这篇关于如何在asp.net 2.0应用程序中设置默认时区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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