Windows Azure Web site (8) Sets the Web site time zone

Source: Internet
Author: User

Windows Azure Platform Family of articles Catalog

Many users who already use Azure Web site have discovered that the default system time for Azure Web site is the UTC time zone.

For example, we create a Web site project locally using Visual Studio 2013 and enter the following code in Default.aspx.cs:

   Label1.Text = DateTime.Now.ToString ();

After the compilation is passed, the local system time is displayed on-premises debugging.

When we deploy to Azure Web site, the UTC time zone is displayed. Such as:

  

In fact, we can set the current time of Web site through the Web Site Configuration page, for example:

  

Add application configuration, such as:

  

Set the Website_time_zone value to China standard time.

This allows the default UTC time zone to be set to China time, which is the utc+8 time zone.

This will be displayed for the utc+8 time zone, such as:

  

Other time zone, you can query http://zonetime.azurewebsites.net/

  

Bo-Three Stone Blog (hereinafter referred to as Benbow), at the end of this blog article at the bottom of the right is not noted reproduced, source, provenance of the works (content) are the original, the site for the original content of the copyright reserved, do not arbitrarily reproduced, if the need for a friend can send mail contact me; reproduced original works (content ) must also follow the Creative Commons agreement "attribution-non-commercial use-consistent", be sure to indicate or retain the original source of the article and the information of the blogger (Lei Zhang) in the form of a text link, and be sure to keep in mind that the photograph works on this blog (www.cnblog.com/ Threestone) and other relevant watermark copyright information, otherwise deemed to infringe the original Copyright Act; Benbow declined commercial website reprint. All rights reserved, prohibit illegal and malicious plagiarism which violates the copyright protection Law of the People's Republic of China and related laws and Benbow (legal) statement.

Windows Azure Web site (8) Sets the Web site time zone

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.