如何更改默认的时区,在湛蓝的网站服务? [英] How to change default time zone in azure website service?
问题描述
我是新来Azure网站服务。
我上传我的网站文件和它的作品非常好。
I'm new to Azure Web Sites service. I uploaded my web site files and it works very nice.
不过,我有一个缺省的时区的问题。
我的位置是首尔(+9)。但是,code返回,当我拨打以下UTC(+0)时间。
But I have a problem with default time zone. My location is Seoul(+9). But the code return UTC(+0) time when I call below.
DateTime.Now;
有什么办法没有复杂的修复来解决这个问题就像编辑Web.config文件?
Is there any way to solve this problem without complicated fix like editing Web.config?
推荐答案
现在可以修改服务器的时区为您的Azure网站/ Web Apps中。
It is now possible to change the server time zone for your Azure Websites / Web Apps.
要做到这一点,添加一个应用程序设置(使用门户)所谓的WEBSITE_TIME_ZONE等同于该时间段的名称(基本上相同的字符串作为HKLM \\ SOFTWARE \\微软\\的Windows NT \\ CURRENTVERSION键名\\时区\\)。
To do this, add an application setting (using the portal) called "WEBSITE_TIME_ZONE" equal to the name of the time zone in question (basically the same string as the key name at HKLM\Software\Microsoft\Windows Nt\CurrentVersion\Time Zones\).
这篇关于如何更改默认的时区,在湛蓝的网站服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!