ossp-pkg/tai/tai_lib.c 1.3 -> 1.4
--- tai_lib.c 2002/04/29 19:24:41 1.3
+++ tai_lib.c 2002/05/01 18:48:34 1.4
@@ -25,7 +25,7 @@
** OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
** SUCH DAMAGE.
**
-** tm.c: API implementation
+** tai_lib.c: API implementation
*/
#include <stdio.h>
@@ -127,6 +127,13 @@
else
tai->tai_zone = strdup(stm->tm_zone);
}
+ else if (type == TAI_TYPE_UNIX) {
+ /* import from time(3) FIXME */
+ time_t t = time(NULL);
+ tai->sec = tai_ui64_n2i((unsigned long)t);
+ tai->asec = tai_ui64_n2i((unsigned long)0);
+ tai_tai2cal(tai, 7200);
+ }
else
return TAI_ERR_IMP; /* FIXME */
va_end(ap);
|
|