Le 07/11/2012 16:08, Jakob Bohm a écrit :
On 11/7/2012 3:39 PM, Charles Mills wrote:
> A struct tm is only granular down to whole seconds, right?

Yes, and it is not the easiest data type for data math either, even
when restricted to GMT/UT1/UTC.

Plus many OS/compiler supplied struct tm related functions work badly
outside the range 1970 to 2037 (U2K38 bug and signedness issues).

What would be really nice would be a function that converted the time
to/from a signed bignum (OpenSSL type BN) of nanoseconds since
1970-01-01 00:00:00.000000000 GMT/UT1/UTC, counting GMT/UT1/UTC virtual
seconds not IAT SI seconds (so an input timestamp of 2012-06-30
23:59:60 would be counted as 2012-06-30 23:59:59 or 2012-07-01 00:00:00
and the straigt subtraction between 2012-06-30 23:59:00 and 2012-07-01
00:00:00 would be 1 hour (3600 seconds), not 3601 seconds).

Such a function would be useless.
There's only 60/61s between these 2 dates, not 3600/3601 ;)

I guess you also mean counting in TAI/POSIX seconds, since these don't include leap seconds, right?
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to