about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--lisp/klatre/klatre.lisp6
-rw-r--r--lisp/klatre/package.lisp2
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/klatre/klatre.lisp b/lisp/klatre/klatre.lisp
index e10ddeea4e..7fb70463a6 100644
--- a/lisp/klatre/klatre.lisp
+++ b/lisp/klatre/klatre.lisp
@@ -86,6 +86,12 @@ separated by SEP."
     (local-time:format-timestring nil timestamp
                                   :format dottime-format
                                   :timezone local-time:+utc-zone+)
+    (format-dottime-offset offset)))
+
+(defun format-dottime-offset (offset)
+  "Render OFFSET in hours in the format specified by dottime."
+  (check-type offset integer)
+  (concatenate 'string
     ; render sign manually since format prints it after padding
     (if (>= offset 0) "+" "-")
     (format nil "~2,'0D" (abs offset))))
diff --git a/lisp/klatre/package.lisp b/lisp/klatre/package.lisp
index 21f659ef18..41174bbb3c 100644
--- a/lisp/klatre/package.lisp
+++ b/lisp/klatre/package.lisp
@@ -10,7 +10,7 @@
 
    ;; String handling
    #:+dottime-format+ #:format-dottime
-   #:try-parse-integer
+   #:try-parse-integer #:format-dottime-offset
 
    ;; Function utilities
    #:partial))