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


Groups > comp.lang.python > #65019

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

Date 2014-01-30 16:03 +0100
From Johannes Findeisen <mailman@hanez.org>
Subject Re: Convert NTP timestamp from NTP packet to System time and date format
References <CAER3tCG=6yhcZ18w5z6BELZbzPtTbc_4Ku5=JyCKxrVU-EoERA@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.6147.1391094775.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, 30 Jan 2014 18:34:04 +0500
Sadia Bashir 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.

Maybe this lib is of interest to you:

https://pypi.python.org/pypi/ntplib/

It does all the NTP stuff for you. If you want to implement that stuff
by yourself just take a look at the code of ntplib, it should explain
what you want.

Regards,
Johannes

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 Johannes Findeisen <mailman@hanez.org> - 2014-01-30 16:03 +0100

csiph-web