Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #65019
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <mailman@hanez.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.041 |
| X-Spam-Evidence | '*H*': 0.92; '*S*': 0.00; 'url:pypi': 0.03; 'receives': 0.04; 'jan': 0.12; 'bashir': 0.16; 'offsets': 0.16; 'readable': 0.16; 'subject: \n ': 0.16; 'subject:Convert': 0.16; 'subject:format': 0.16; 'timestamp': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'format,': 0.24; 'sends': 0.24; 'header:In-Reply-To:1': 0.27; 'specifically': 0.29; 'correct': 0.29; 'appreciated.': 0.29; 'code': 0.31; 'stuff': 0.32; 'url:python': 0.33; 'subject:time': 0.33; 'maybe': 0.34; 'subject:from': 0.34; 'convert': 0.35; 'charset:us-ascii': 0.36; 'url:org': 0.36; 'should': 0.36; 'implement': 0.38; 'server': 0.38; 'to:addr:python-list': 0.38; 'explain': 0.39; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'read': 0.60; 'received:unknown': 0.61; 'you.': 0.62; 'interest': 0.64; 'received:109': 0.72; 'yourself': 0.78; 'you:': 0.81; 'everyone;': 0.84; 'received:(helo localhost)': 0.91 |
| Date | Thu, 30 Jan 2014 16:03:30 +0100 |
| From | Johannes Findeisen <mailman@hanez.org> |
| To | python-list@python.org |
| Subject | Re: Convert NTP timestamp from NTP packet to System time and date format |
| In-Reply-To | <CAER3tCG=6yhcZ18w5z6BELZbzPtTbc_4Ku5=JyCKxrVU-EoERA@mail.gmail.com> |
| References | <CAER3tCG=6yhcZ18w5z6BELZbzPtTbc_4Ku5=JyCKxrVU-EoERA@mail.gmail.com> |
| X-Mailer | Claws Mail 3.9.3 (GTK+ 2.24.22; x86_64-pc-linux-gnu) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.6147.1391094775.18130.python-list@python.org> (permalink) |
| Lines | 22 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1391094775 news.xs4all.nl 2885 [2001:888:2000:d::a6]:59358 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:65019 |
Show key headers only | 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
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