JS Green time converted into the

Source: Internet
Author: User
Tags time zones

Pacific Time Zone-refers to the time zones in Los Angeles, San Francisco, San Diego, Las Vegas, Seattle, etc. Beijing time for Pacific time plus 16 hours, and GMT is Pacific time plus 8 hours if Pacific time is 4 points, then GMT is 12, Beijing time is 20 points

PS: The title is green time, in fact, any non-Beijing time can be converted into China

Javascript:

The code is as follows Copy Code

"Fri, APR 2014 03:01:08 GMT"//Green Time
"Fri APR 2014 11:10:08 gmt+0800 (China Standard Time)"//Beijing

Can see green time and the biggest difference is the "+0800";
So the conversion method is also very simple

Javascript:

The code is as follows Copy Code
var bjtime = "Fri, APR 2014 03:01:08 GMT" + "+0800"; GMT

Although converted to Beijing time, but the 8-hour jet lag has not changed, so in the use of time, still need to pay attention to this

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.