JavaScript time and date processing combat: You must have been in a hole.

Source: Internet
Author: User
Tags time zones iso 8601 string format time and date

Reproduced from: http://web.jobbole.com/89120/

The Knowledge Atlas of this section refers to the Atlas of programming language knowledge-time and date.

This article JavaScript time and date processing combat: You must be trapped from the author's web front-end and best practices in the introduction to JavaScript and best practice series articles. JavaScript DateTime Standard Time

GMT is the "Greenwich Mean Time" (Greenwich Mean times, referred to as G.M.T), the standard time for the Royal Green Wedge Observatory in the British suburb of London, because Meridian is defined as passing through the meridians there. However, due to the irregular rotation of the earth, the GMT time is caused by errors, so it is no longer used as a standard time. UTC is the most important world time standard, the time that passes through the average solar time (whichever is GMT), the new time mark after the Earth's motion is corrected, and the combined actuarial calculation of the international atom with "seconds" as its unit. UTC is more accurate than GMT. The error value must remain within 0.9 seconds, and if greater than 0.9 seconds is released by the International Earth Rotation transaction NCBs in Paris, the UTC will be the same as the Earth rotation cycle. In everyday use, however, the functions and accuracy of GMT and UTC are no different. The coordinated world time zone is represented using "Z". And in aviation, all the use of time uniformity rules are coordinated world time. and z should be read as "Zulu" (see the NATO phonetic alphabet) on the radio, and the coordinated world will also be called "Zulu time". TIMEZONE&UTC Offsets: time zone and offset

People often confuse time zones with UTC offsets, which represent the difference between a specific time value and UTC time, usually expressed in hh:mm form. TimeZone represents a geographic region where multiple offsets are often included in a timezone, and multiple time zones may have the same offset at some time of the year. For example, America/chicago, America/denver, and America/belize will include -06:00 this shift at different times of the year. time Stamp

The Unix timestamp represents the number of seconds that correspond to the current time to January 1, 1970 00:00:00 UTC. Note that the timestamp in JavaScript refers to the number of milliseconds corresponding to the current time to January 1, 1970 00:00:00 UTC, and that the Unix timestamp is not a concept, which represents a number of seconds, 1000 times times worse. time number string format RFC2822

Javascript

1 2 YYYY/MM/DD Hh:mm:ss±timezone (time zone is represented by 4 digits)//EG 1992/02/12 12:23:22+0800

ISO 8601

ISO 8601 is the date and time representation method, the full name of data storage and Exchange forms • Information Exchange, date and time representation method. Currently the latest for the third edition of Iso8601:2004, the first edition of iso8601:1988, the second edition of iso8601:2000. The year is composed of 4 digits, in the Gregorian calendar A.D. 1 for 01, to BC 1 to 00, BC before 2-01, and so on. Other dating methods are to be converted into Gregorian calendars, but if the two parties that send and receive information have common and agreed-upon methods, they can apply them. Javascript

1 2 3 4
Related Article

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.