RFC868

xiaoxiao2021-03-06  108

Organization: China Interactive Publishing Network (http://www.china-pub.com/)

RFC Document Chinese Translation Program (http://www.china-pub.com/compters/emook/aboutemook.htm)

E-mail: Ouyang@china-pub.com

Translator: Gu Guofei (GGFEI GGFEI@263.net)

Translation time: 2001-4-8

Copyright: This Chinese translation copyright belongs to China Interactive Publishing Network. Can be used for non-commercial use free reprint, but the translation and copyright information of this document must be retained.

Network Working Group J. Postel - ISI

Request for Comments: 868 K. Harrenstien - SRI

May 1983

RFC868 Time Agreement

(RFC868 TIME Protocol)

This RFC specifies the standards on ARPA Internet Community. All hosts on the ARPA Internet should adopt and implement this standard.

This agreement provides a separate site, machine readable date and time information. Time service returns to the number of seconds, which is the number of seconds from January 1, 1900, and the heavens are not small.

An important purpose of designing this agreement is that many hosts on the Internet have no time concepts. On distributed systems, we can think about it, how is Beijing time and Tokyo time? The time of the host can often change, and because the error in the machine clock is inconsistent, it is necessary to use the time server to get the network time through the electoral mode, so that the server has an accurate time concept. Don't take a small time, this is a simple program that is running for time standard distribution.

This protocol can work under TCP and UDP protocols. Below is a working process of time protocols working through TCP protocol: Here S represents servers, and C represents customers.

S: Detect port 37

U: Connect to the port 37

S: Send time with 32-bit binary

U: receive time

U: Close connection

S: Close connection

The server listens on the port 37. When the connection is established, the server returns a 32-bit time value and then closes the connection. This process is not difficult. If the server cannot decide what time is now, the server will refuse to connect or do not send any data and close the connection directly.

Let's take a look at the use of the UDP protocol: Here S represents servers, C represents customers.

S: Detect port 37

U: Send an empty data to the port 37

S: Receive this empty datam

S: Send a data report that contains 32-bit binary numbers (used to indicate time)

U: Receive time dataset

The server listens on the packet on port 37. When a data package comes, the server returns a data packet containing 32-bit time. This process is not difficult. If the server can't decide what time is now, the server will discard the received datagram without any response.

* Time

Time is represented by 32 points, which is from January 1, 1900 to the current number of seconds, we can calculate it, this agreement can only be used in 2036. (But we also know that the computer development speed is so fast, it may come to the time, there will be a better agreement instead of this agreement, or have a valid solution.)

Here are some examples:

The Time 2,208,988,800 Corresponds to 00:00 1 Jan 1970 GMT,

2,398,291,200 Corresponds to 00:00 1 Jan 1976 GMT, 2,524,521,600 Corresponds to 00:00 1 Jan 1980 GMT,

2,629,584,000 Corresponds to 00:00 1 May 1983 GMT,

And -1,297,728,000 Corresponds to 00:00 17 NOV 1858 GMT.

RFC868-Time Protocol RFC868 Time Agreement

1

1

Chinese document translation plan

转载请注明原文地址:https://www.9cbs.com/read-125974.html

New Post(0)