(defvar *ts* "%FT%T") (defvar *pts* #'parse-iso8601-time-string) (cl-defun n (&key (h 0) (m 0) (s 0) (yy 0) (mm 0) (dd 0) (ts *ts*) (fn *pts*)) (cl-destructuring-bind (second minute hour day month year weekday dst zone) (decoded-time-add (decode-time (funcall fn (format-time-string ts))) (make-decoded-time :second s :minute m :hour h :day dd :month mm :year yy)) (format "%02d-%02d-%02dT%02d:%02d:%02d" year month day hour minute second))) (n) ;; => "2026-01-04T18:04:07" (n :h 4) ;; => "2026-01-04T22:04:08" (n :h (* 24 -4)) ;; => "2025-12-31T18:04:33" (n :yy -4 :h 24 :mm -3) ;; => "2022-10-05T18:05:26"