JavaScript gets the current time zone transition __java

Source: Internet
Author: User

JavaScript gets the current time zone:

Date (). getTimezoneOffset ()
This gets the time difference from the 0 timezone (0 time zone minus the current time zone, in minutes)
China Standard Time is the East eight area, the time is 8 hours earlier than the 0 time zone, therefore is 480, divides 60 is the time zone
 
When the time string is converted to milliseconds, if we do not add a time zone, the system defaults to adding the current time zone, or it can customize the time zone to convert
(You can also turn to milliseconds, plus time difference, and then turn into a timing string, which is obviously much more troublesome)



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.