From fa1d4b3c96a29c739475f5f349bbe7b343643808 Mon Sep 17 00:00:00 2001 From: "Kevin M. Rosenberg" Date: Wed, 7 Jan 2004 13:29:24 +0000 Subject: [PATCH] r8495: add example function --- tests/time.lisp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/time.lisp b/tests/time.lisp index 279dee0..8e2c6ef 100644 --- a/tests/time.lisp +++ b/tests/time.lisp @@ -90,3 +90,13 @@ (zerop res2)))) t) +(defun posix-time-to-localtime-string (secs) + "Converts number of seconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC)" + (string-right-trim + '(#\newline #\return) + (uffi:convert-from-cstring + (uffi:with-foreign-object (time 'time-t) + (setf (uffi:deref-pointer time :unsigned-long) + secs) + (c-ctime time))))) + -- 2.34.1