mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-04 10:31:02 +02:00
Allow date formats to miss time parts.
In case the seconds field are not provided just use "00" rather than NIL as currently...
This commit is contained in:
parent
6cbec206af
commit
da05782002
@ -62,13 +62,15 @@
|
||||
|
||||
;; now format the time part
|
||||
(format s "~a:~a:~a"
|
||||
(let ((hint (parse-integer hour)))
|
||||
(cond ((and am (= hint 12)) "00")
|
||||
((and pm (= hint 12)) "12")
|
||||
((and pm (< hint 12)) (+ hint 12))
|
||||
(t hour)))
|
||||
minute
|
||||
seconds)
|
||||
(if hour
|
||||
(let ((hint (parse-integer hour)))
|
||||
(cond ((and am (= hint 12)) "00")
|
||||
((and pm (= hint 12)) "12")
|
||||
((and pm (< hint 12)) (+ hint 12))
|
||||
(t hour)))
|
||||
"00")
|
||||
(or minute "00")
|
||||
(or seconds "00"))
|
||||
|
||||
;; and maybe format the micro seconds part
|
||||
(if usecs (format s ".~a" usecs)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user