gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] Bug found in unix_to_iso8601()


From: Gary E. Miller
Subject: Re: [gpsd-dev] Bug found in unix_to_iso8601()
Date: Thu, 8 Nov 2018 14:30:48 -0800

Yo Peter!

On Thu, 08 Nov 2018 21:43:38 +0000 (GMT)
Peter Liu <address@hidden> wrote:

> If the fractional part is 0.9995 or larger, it is rounded up and
> tractstr returns "1.000". It is not ".999".  

Ouch.  Confirmed.  I added a regression test for it.  Not pushed yet,

    1541766896.999412 -> "2018-11-09T12:34:56.999Z"
    1541766896.999512 -> "2018-11-09T12:34:56.000Z"

s/b:

    2018-11-09T12:34:56.999Z
    2018-11-09T12:34:57.000Z

Working on a fix.

This might explain some oddities we have seen.  Many places in gpsd
use similar code...

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin

Attachment: pgpy3J6ekdEg2.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]