Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #65003

Re: Convert NTP timestamp from NTP packet to System time and date format

References <CAER3tCG=6yhcZ18w5z6BELZbzPtTbc_4Ku5=JyCKxrVU-EoERA@mail.gmail.com>
Date 2014-01-31 01:02 +1100
Subject Re: Convert NTP timestamp from NTP packet to System time and date format
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.6139.1391090565.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Jan 31, 2014 at 12:34 AM, Sadia Bashir
<11msccssbashir@seecs.edu.pk> wrote:
> Hello everyone;
>
> I want to write NTP client which sends and receives NTP packet to NTP server
> and should read the value from one of the four offsets and convert it to
> user readable local or GMT time format, I specifically want to know which
> offsets should I read in order to get correct timestamp from the packet.
> Any suggestion or help will be appreciated.
>

Any time you're looking at network protocols, the one obvious place to
look is the RFCs. Just do a web search for 'rfc ntp' to find the
relevant ones. In my case, the search results pulled up a couple of
good-looking hits from ietf.org (the Internet Engineering Task Force -
those guys are the authority on this sort of matter), plus the
Wikipedia article for NTP, with a section "Relevant RFCs", which would
make good reading.

Enjoy! Networking's awesome fun.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Convert NTP timestamp from NTP packet to System time and date format Chris Angelico <rosuav@gmail.com> - 2014-01-31 01:02 +1100

csiph-web