Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Oct 2006 10:52:03 -0700
From:      Chuck Swiger <cswiger@mac.com>
To:        Martin McCormick <martin@dc.cis.okstate.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: A Question of How to Handle Numerical Notation
Message-ID:  <CFDEB7DB-2D36-4807-A3AD-A57C57A944BA@mac.com>
In-Reply-To: <200610061126.k96BQ0KO004716@dc.cis.okstate.edu>
References:  <200610061126.k96BQ0KO004716@dc.cis.okstate.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Oct 6, 2006, at 4:26 AM, Martin McCormick wrote:
> 	Does anybody know what this notation is called?  Does an
> explanation of the algorithm exist in public so one can convert the
> strings that are part of the call manager output in to the unsigned
> ints that actually carry the right values?
>
> 	An example of the string in question looks like:
>
> "370A65FA-6965-4E40-A0DA-EC88DE6B"

That sure looks like a UUID, which may or may not encode valid time  
information.  See:

http://en.wikipedia.org/wiki/UUID
http://www.ietf.org/rfc/rfc4122.txt

4.1.4.  Timestamp

    The timestamp is a 60-bit value.  For UUID version 1, this is
    represented by Coordinated Universal Time (UTC) as a count of 100-
    nanosecond intervals since 00:00:00.00, 15 October 1582 (the date of
    Gregorian reform to the Christian calendar).

    For systems that do not have UTC available, but do have the local
    time, they may use that instead of UTC, as long as they do so
    consistently throughout the system.  However, this is not  
recommended
    since generating the UTC from local time only needs a time zone
    offset.

    For UUID version 3 or 5, the timestamp is a 60-bit value constructed
    from a name as described in Section 4.3.

    For UUID version 4, the timestamp is a randomly or pseudo-randomly
    generated 60-bit value, as described in Section 4.4.

     0                   1                   2                   3
     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                          time_low                             |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |       time_mid                |         time_hi_and_version   |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |clk_seq_hi_res |  clk_seq_low  |         node (0-1)            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    |                         node (2-5)                            |
    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

-- 
-Chuck





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CFDEB7DB-2D36-4807-A3AD-A57C57A944BA>