Highcharts time 8 hours less problem

Source: Internet
Author: User

UTC (World standard Time) is turned on by default in Highcharts, since China's time zone is +8, 8 hours will be subtracted after processing by highcharts.

If you do not want to use UTC, there are 2 ways to use it:

1. Add the following code to the page using Highcharts:

[HTML]View Plaincopy
    1. <script type="Text/javascript">
    2. Highcharts.setoptions ({global: {useutc:false}});
    3. </Script>

2, in the Highcharts source file to set up, Highcharts/js/highcharts.src.js found the following code:

[HTML]View Plaincopy
    1. Global: {
    2. Useutc:true,
    3. Canvastoolsurl: ' Http://code.highcharts.com/3.0.1/modules/canvas-tools.js ',
    4. Vmlradialgradienturl: ' Http://code.highcharts.com/3.0.1/gfx/vml-radial-gradient.png '
    5. },

Change one of the useutc:true to Useutc:false, save. Refresh the page.

Highcharts time 8 hours less problem

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.