[LEAPSECS] [time-nuts] Leap Quirks
M. Warner Losh
imp at bsdimp.com
Mon Jan 5 10:20:08 EST 2009
In message: <496214F4.1090304 at rubidium.dyndns.org>
Magnus Danielson <magnus at rubidium.dyndns.org> writes:
: Rob,
:
: Rob Seaman skrev:
: > Magnus Danielson wrote:
: >
: >> time_t = d*86400 + h*3600 + m*60 + s
: >
: > Just thought I'd note an alternate interpretation. In NOAO's widely
: > distributed image processing system (IRAF) a sexagesimal number is a
: > double precision floating point number, not an integer:
: >
: > 12:34:56 = 12 + 34/60 + 56.0/3600
: >
: > Wherever a float can appear, a sexagesimal string is permitted. Our
: > version of printf includes %h and %H for turning a binary float back
: > into dd:mm:ss.s or hh:mm:ss.s.
: >
: > A particular application may need to count integer seconds (as in our
: > own date and time library, perhaps), but the need is remarkably
: > infrequent. For the vast majority of cases sexagesimal numbers behave
: > like floats.
:
: Hate to nitpick you, but that is a different representation, not a
: different interpretation.
:
: The floating point number is thus in hours, is that more practical than
: say days?
And how are leap seconds represented in this convention?
Warner
More information about the LEAPSECS
mailing list