Skip to content

Commit

Permalink
Revise the timestamp formatting functions to accept wide characters.
Browse files Browse the repository at this point in the history
  • Loading branch information
leetayres authored and dlowe-net committed Nov 25, 2014
1 parent d6683a0 commit fe4a014
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/local-time.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
(declaim (inline now format-timestring %get-current-time
format-rfc3339-timestring to-rfc3339-timestring
format-rfc1123-timestring to-rfc1123-timestring)
(ftype (function (&rest t) simple-base-string) format-rfc3339-timestring)
(ftype (function (&rest t) simple-base-string) format-timestring)
(ftype (function (&rest t) string) format-rfc3339-timestring)
(ftype (function (&rest t) string) format-timestring)
(ftype (function (&rest t) fixnum) local-timezone)
(ftype (function (&rest t) (values
timezone-offset
Expand Down Expand Up @@ -237,7 +237,7 @@
"Returns a string created from the vector of unsigned bytes VECTOR starting at OFFSET which is terminated by a 0."
(declare (type (vector (unsigned-byte 8)) vector))
(let* ((null-pos (or (position 0 vector :start offset) (length vector)))
(result (make-string (- null-pos offset) :element-type 'base-char)))
(result (make-string (- null-pos offset) :element-type 'character)))
(loop for input-index :from offset :upto (1- null-pos)
for output-index :upfrom 0
do (setf (aref result output-index) (code-char (aref vector input-index))))
Expand Down Expand Up @@ -1588,7 +1588,7 @@ It should be an instance of a class that responds to one or more of the methods
(%timestamp-decode-iso-week timestamp)
(let ((*print-pretty* nil)
(*print-circle* nil))
(with-output-to-string (result nil :element-type 'base-char)
(with-output-to-string (result nil :element-type 'character)
(dolist (fmt format)
(cond
((member fmt '(:gmt-offset :gmt-offset-or-z :gmt-offset-hhmm))
Expand Down

0 comments on commit fe4a014

Please sign in to comment.