A Portable Time Library
(aptimelib)

We have here a highly portable 64-bit time/date (datetime) library, with microsecond granularity, epoch basis, alphanumeric formatting, and excellent range.  Right now, it compiles and test-runs under both MingW and Cygwin, and it is thought that any gcc version supporting 'long long int' should compile it very well indeed, on any platform. This project has formally begun as of only 2/8/2006; it is being called beta code with two known issues of significance, latest version 0.7.  

It has a SourceForge (SourceForge.net Logo) project page:

In addition to being at SourceForge, the current release notes are here.

The code is intended to be used with everything Win32 and quasix, to be as compiler-transportable as possible.  
Very badly needed is help and specific suggestions as to rigorous testing and speed increase, and also help doing distribution-building of all kinds.  

The aptimelib project was instigated while working on a project for a friend (to be released ATN), and needed a time library, and on
2/7/2006 started the research. And found several, none extremely multiplatform, none entirely portable, or transportable, or even extremely interoperable.  I found somewhat promising items here and there, but nothing I could count on to work in all ways, in the extreme.

Except on David Tribble's web site.  I found this page:

http://david.tribble.com/text/c0xlongtime.html

So I thought maybe the thought was good, the niche was real, the work just not quite done yet.  I emailed David, and received wonderful encouragement.  And here we are.

Known Issues of Significance

The first issue is that mklongtime() does not work.  This was originally an oversight on Jonathan's part, for which he is apologetic; however, he does not appear to have the requisite ability to code it.  Help is indicated.  A skeleton exists at the end of aptimelib.c.

The other is that leap-second capability is not in yet.  Leap-seconds are quite rare (thirty since 1972), so accuracy is not harmed much. There is much general effort being done to standardize a solution to the problem of handling leap-seconds (see this wikipedia entry).  
David is working on a solution.   One of the principal aspects is the fact that the rotation of the earth is not predictable with extreme accuracy and precision in the long term.  


http//joshuacorps.org