projects
/
uffi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f1f265e
)
r8495: add example function
author
Kevin M. Rosenberg
<kevin@rosenberg.net>
Wed, 7 Jan 2004 13:29:24 +0000
(13:29 +0000)
committer
Kevin M. Rosenberg
<kevin@rosenberg.net>
Wed, 7 Jan 2004 13:29:24 +0000
(13:29 +0000)
tests/time.lisp
patch
|
blob
|
history
diff --git
a/tests/time.lisp
b/tests/time.lisp
index 279dee0ff495f4ca27e19c38a76e8662ced9f899..8e2c6efcef4dbee009492f88f960b2c9d62e2e6d 100644
(file)
--- 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)))))
+