+(defun time-to-localtime (in)
+ "Ensures that if we have a time thats not in UTC, treat it as a localtime,
+ and convert to UTC"
+ (if (not (time-is-utc? in))
+ in
+ (let ((newt
+ (time+ in (make-duration :second (- (%universal-ts-offset in))))))
+ (setf (time-is-utc? newt) nil)
+ newt)))
+