Time::TAI64 - a library for storing and manipulating dates and times.
use Time::TAI64 qw( :caldate :caltime :tai :leapsecs :taia ); use Time::TAI64 qw( :all );
NOTE: THIS IS AN EXPERIMENTAL VERSION. THE USER INTERFACE WILL CHANGE AND IT WILL CHANGE DRASTICALLY. PLEASE WAIT UNTIL VERSION 1.9 BEFORE USING THIS MODULE.
ALSO, A LOT OF THE CODE WILL CHANGE. SO, DON'T RELY ON ANYTHING IN THIS MODULE BEING THE SAME IN TWO WEEKS. OH, AND THE DOCUMENTATION WILL BE DRASTICALLY IMPROVED.
THAT SAID, TEST FAILURES WOULD BE APPRECIATED =)
Time::TAI64 is a library for storing and manipulating dates and times.
Time::TAI64 supports two time scales:
Time::TAI64 provides an internal format for TAI64,
TAIPtr, designed for fast time manipulations. The tai_pack() and tai_unpack() routines convert between struct tai and a portable 8-byte TAI64 storage format. Time::TAI64 provides similar internal and external formats for TAI64NA (
CaldatePtr to store dates in year-month-day form. It can convert
CaldatePtr, under the Gregorian calendar, to a modified Julian day number for easy date arithmetic.
CaltimePtr to store calendar dates and times along with UTC offsets. It can convert from
CaltimePtr in UTC, accounting for leap seconds, for accurate date and time display. It can also convert back from
TAIPtr for user input. Its overall UTC-to-TAI conversion speed is 100x better than the usual UNIX mktime() implementation.
This version of Time::TAI64 requires a UNIX system with gettimeofday(). It will be easy to port to other operating systems with compilers supporting 64-bit arithmetic.
The preferred way of using this library is through objects. You don't have to though since the complete complement of functions is available via various export groups. See the FUNCTIONS section for more detail.
There's quite a few functions. 41 all up (unless I miscounted). This section is divided into the export groups.
I will warn you, up front, that your code will end up over long if you stick to using functions. Each data object produced by this module that is not a simple integer or string is an opaque object and you will need to use accessors to use its attributes. Thus, the OO interface is generally recommended.
Iain Truskett <email@example.com> http://eh.org/~koschei/
Please report any bugs to http://rt.cpan.org/ or email them (and/or suggestions to me directly at <firstname.lastname@example.org>
XS and Perl code copyright (c) 2002 Iain Truskett. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
C source files derived from qlogtools, copyright 2000 Bruce Guenter. Those derived from libtai are public domain. Those from daemontools are copyright 2001 D J Bernstein.
DJB for writing libtai and daemontools. Bruce Guenter for qlogtools.