<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 26, 2015 at 9:39 AM, Guy Harris <span dir="ltr"><<a href="mailto:guy@alum.mit.edu" target="_blank">guy@alum.mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
</span>Positive leap seconds have valid UTC values - they just happen to have ":60" or ":61" rather than ":00" throught ":59" at the end of the label.<br>
<br>
What those leap seconds lack is:<br>
<br>
        a valid *POSIX time* value - the way POSIX time is defined makes that impossible;<br>
<br>
        from at least one MSDN document, a valid Windows FILETIME value, as those also treat leap seconds the way POSIX time stamps do.<br><br>
Time stamps that are specified as a count of *all* seconds, including leap seconds, and fractions of a second since some specified epoch, are ideal for:<br>
<br>
        1) attaching UTC labels to packet arrival times;<br>
        2) calculating the difference between packet arrival times.<br>
<br>
They aren't ideal for attaching "POSIX time" or "Windows time" labels to packets, as you need to compensate for those labels not matching UTC.  They're also not ideal for packet time-stamping code on OSes where the clock keeps "let's ignore leap seconds" time rather than UTC.</blockquote><div> </div></div><div>You are correct of course, however the issue remains that the POSIX/Windows time encoding is ambiguous at several points. Does the pcapng explicitly specify POSIX/Windows time encoding, or does the reference to UTC imply that the time stamps are monotonic?<br></div><div><br></div><div>A monotonic count of seconds since an epoch is in practice what both TAI and GPS provide (there is a fixed offset between them due to different epochs). TAI is the default time base for PTP and IRIG-B clocks, so is often available where people really care about time stamp quality.</div><div><br></div><div>I was not suggesting changing the 'default' time stamp definition of pcapng, but rather adding an option for the interpretation to be e.g. 'TAI' rather than 'POSIX/Windows UTC' encoding for clarity.</div><div><br></div><div>Stephen</div><div class="gmail_signature"><div dir="ltr"><span><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#404040"><br></span></span></div></div>
</div></div>