anchor.diff:    "Returns a new LOCAL-TIME containing the difference between TIME-A and TIME-B"
     (multiple-value-bind (day-a sec-a)
   	  (local-time-adjust time-a (timezone-of time-b))
  -	(let ((usec (- (epoch-usec-of time-a) (epoch-usec-of time-b)))
  -		  (seconds (- sec-a (epoch-sec-of time-b)))
  -		  (days (- day-a (epoch-day-of time-b))))
  -	  (when (minusp usec)
  -		(decf seconds)
  -		(incf usec 1000000))
  -	  (when (minusp seconds)
  -		(decf days)
  -		(incf seconds 86400))
  -	  (make-local-time :epoch-usec usec
  -					   :epoch-sec seconds
  -					   :epoch-day days
  -					   :timezone (timezone-of time-b)))))
  +      (let ((usec (- (usec-of time-a) (usec-of time-b)))
  +            (seconds (- sec-a (sec-of time-b)))
  +            (days (- day-a (day-of time-b))))
  +        (when (minusp usec)
  +          (decf seconds)
  +          (incf usec 1000000))
  +        (when (minusp seconds)
  +          (decf days)
  +          (incf seconds 86400))
  +        (make-localtime :usec usec
  +                        :sec seconds
  +                        :day days))))
   
   (defun local-time-sum (time-a time-b)
     "Returns a new LOCAL-TIME containing the sum of TIME-A and TIME-B"
     (multiple-value-bind (day-a sec-a)
  -      (local-time-adjust time-a (timezone-of time-b))
  -    (let ((usec (+ (epoch-usec-of time-a) (epoch-usec-of time-b)))
  -          (sec (+ sec-a (epoch-sec-of time-b)))
  -          (day (+ day-a (epoch-day-of time-b))))
  -      (when (> usec 1000000)
  -        (decf usec 1000000)
  -        (incf sec))
  -      (when (> sec 86400)
  -        (decf sec 86400)
  -        (incf day))
  -      (make-local-time :epoch-usec usec
  -                       :epoch-sec sec
  -                       :epoch-day day
  -                       :timezone (timezone-of time-b)))))
  +	  (local-time-adjust time-a (timezone-of time-b))
  +	(let ((usec (+ (epoch-usec-of time-a) (epoch-usec-of time-b)))
  +		  (sec (+ sec-a (epoch-sec-of time-b)))
  +		  (day (+ day-a (epoch-day-of time-b))))
  +	  (when (> usec 1000000)
  +		(decf usec 1000000)
  +		(incf sec))
  +	  (when (> sec 86400)
  +		(decf sec 86400)
  +		(incf day))
  +	  (make-local-time :epoch-usec usec
  +					   :epoch-sec sec
  +					   :epoch-day day
  +					   :timezone (timezone-of time-b)))))
   
   (defun local-time-compare (time-a time-b)
     "Returns the symbols <, >, or =, describing the relationship between TIME-A and TIME-b."
     (multiple-value-bind (day-a sec-a)
  -      (local-time-adjust time-a (timezone-of time-b))
  -    (cond
  -      ((< day-a (epoch-day-of time-b)) '<)
  -      ((> day-a (epoch-day-of time-b)) '>)
  -      ((< sec-a (epoch-sec-of time-b)) '<)
  -      ((> sec-a (epoch-sec-of time-b)) '>)
  -      ((< (epoch-usec-of time-a) (epoch-usec-of time-b)) '<)
  -      ((> (epoch-usec-of time-a) (epoch-usec-of time-b)) '>)
  -      (t                                                     '=))))
  +	  (local-time-adjust time-a (timezone-of time-b))
  +	(cond
  +	  ((< day-a (epoch-day-of time-b)) '<)
  +	  ((> day-a (epoch-day-of time-b)) '>)
  +	  ((< sec-a (epoch-sec-of time-b)) '<)
  +	  ((> sec-a (epoch-sec-of time-b)) '>)
  +	  ((< (epoch-usec-of time-a) (epoch-usec-of time-b)) '<)
  +	  ((> (epoch-usec-of time-a) (epoch-usec-of time-b)) '>)
  +	  (t													 '=))))
   
   (defun month-days (month)
     (aref +month-days+ month))
  
positive.code:   `(make-instance 'local-time ,@args))
  
  (defparameter +utc-zone+ (make-timezone :subzones '((0 nil "UTC" nil nil))
                                          :loaded t)
    "The zone for Coordinated Universal Time.")
  
  (defun unix-time (local-time)
    "Return the Unix time corresponding to the LOCAL-TIME"
    (+ (* (+ (epoch-day-of local-time) 11017) 86400)
  	 (epoch-sec-of local-time)))
  
  (defun timezone (local-time &optional timezone)
    "Return as multiple values the time zone as the number of seconds east of UTC, a boolean daylight-saving-p, the customary abbreviation of the timezone, the starting time of this timezone, and the ending time of this timezone."
    (let* ((zone (realize-timezone
                  (or timezone (timezone-of local-time) *default-timezone*)))
           (subzone-idx (or
                         (second (assoc (unix-time local-time)
                                        (timezone-transitions zone)
                                        :test #'>))
                         0))
           (subzone (nth subzone-idx (timezone-subzones zone))))
      (values
       (first subzone)
       (second subzone)
       (third subzone))))
  
  (defun local-time-adjust (source timezone &optional (destination nil))
    "Returns two values, the values of new DAY and SEC slots, or, if DESTINATION is a LOCAL-TIME instance, fills the slots with the new values and returns the destination"
    (realize-timezone (timezone-of source))
    (realize-timezone timezone)
    (let* ((offset-diff (- (timezone source timezone) 
                           (timezone source (timezone-of source))))
           (offset-sign (signum offset-diff)))
      (multiple-value-bind (offset-day offset-sec)
          (floor (abs offset-diff) 86400)
        (let ((new-day (+ (day-of source) (* offset-sign offset-day)))
              (new-sec (+ (sec-of source) (* offset-sign offset-sec))))
          (when (minusp new-sec)
            (incf new-sec 86400)
            (decf new-day))
          (cond
            (destination
             (setf (usec-of destination) (usec-of source)
                   (sec-of destination) new-sec
                   (day-of destination) new-day
                   (timezone-of destination) timezone)
             destination)
            (t
             (values new-day new-sec)))))))
  
  (defun astronomical-julian-date (local-time)
    (- (day-of local-time) +astronomical-julian-date-offset+))
  
negative.code: (defun read-binary-integer (stream byte-count &optional (signed nil))
    "Read BYTE-COUNT bytes from the binary stream STREAM, and return an integer which is its representation in network byte order (MSB).  If SIGNED is true, interprets the most significant bit as a sign indicator."
    (loop for offset from (* (1- byte-count) 8) downto 0 by 8
  		with result = 0
  		do (setf (ldb (byte 8 offset) result) (read-byte stream))
  		finally (if (and signed (< #x80000000 result))
  					(return (- result #x100000000))
  					(return result))))
  
  (defun string-from-unsigned-vector (vector offset)
    "Returns a string created from the vector of unsigned bytes VECTOR starting at OFFSET which is terminated by a 0."
    (let ((null-pos (or (position 0 vector :start offset) (length vector))))
  	(with-output-to-string (str)
  						   (loop for idx from offset upto (1- null-pos)
  								 do (princ (code-char (aref vector idx)) str)))))
  
  (defun realize-timezone (zone &optional reload)
    "If timezone has not already been loaded or RELOAD is non-NIL, loads the timezone information from its associated unix file."
    (when (or reload (not (timezone-loaded zone)))
  	(with-open-file (inf (timezone-path zone)
  						 :direction :input
  						 :element-type 'unsigned-byte)
  	  ;; read and verify magic number
  	  (let ((magic-buf (make-array 4 :element-type 'unsigned-byte)))
  		(read-sequence magic-buf inf :start 0 :end 4)
  		(when (string/= (map 'string #'code-char magic-buf) "TZif" :end1 4)
  		  (error "~a is not a timezone file." (timezone-path zone))))
  	  ;; skip 16 bytes for "future use"
  	  (let ((ignore-buf (make-array 16 :element-type 'unsigned-byte)))
  		(read-sequence ignore-buf inf :start 0 :end 16))
  	  ;; read header values
  	  (let ((utc-indicator-count (read-binary-integer inf 4))
  			(wall-indicator-count (read-binary-integer inf 4))
  			(leap-count (read-binary-integer inf 4))
  			(transition-count (read-binary-integer inf 4))
  			(type-count (read-binary-integer inf 4))
  			(abbrev-length (read-binary-integer inf 4)))
  		(let ((timezone-transitions
  			   ;; read transition times
  			   (loop for idx from 1 upto transition-count
  					 collect (read-binary-integer inf 4 t)))
  			  ;; read local time indexes
  			  (local-time-indexes
  			   (loop for idx from 1 upto transition-count
  					 collect (read-binary-integer inf 1)))
  			  ;; read local time info
  			  (local-time-info
  			   (loop for idx from 1 upto type-count
  					 collect (list (read-binary-integer inf 4 t)
  								   (/= (read-binary-integer inf 1) 0)
  								   (read-binary-integer inf 1))))
  			  ;; read leap second info
  			  (leap-second-info
  			   (loop for idx from 1 upto leap-count
  					 collect (list (read-binary-integer inf 4)
  								   (read-binary-integer inf 4))))
  			  (abbreviation-buf (make-array abbrev-length :element-type 'unsigned-byte)))
  		  (read-sequence abbreviation-buf inf :start 0 :end abbrev-length)
  		  (let ((wall-indicators
  				 ;; read standard/wall indicators
  				 (loop for idx from 1 upto wall-indicator-count
  					   collect (read-binary-integer inf 1)))
  				;; read UTC/local indicators
  				(local-indicators
  				 (loop for idx from 1 upto utc-indicator-count
  					   collect (read-binary-integer inf 1))))
  			(setf (timezone-transitions zone)
  				  (nreverse
  				   (mapcar
  					(lambda (info index)
  					  (list info index))
  					timezone-transitions
  					local-time-indexes)))
  			(setf (timezone-subzones zone)
  				  (mapcar
  				   (lambda (info wall utc)
  					 (list (first info)
  						   (second info)
  						   (string-from-unsigned-vector abbreviation-buf (third info))
  						   (/= wall 0)
  						   (/= utc 0)))
  				   local-time-info
  				   wall-indicators
  				   local-indicators))
  			(setf (timezone-leap-seconds zone)
  				  leap-second-info)))))
  	(setf (timezone-loaded zone) t))
    zone)
  
  (defmacro define-timezone (zone-name zone-file &key (load nil))
    "Define zone-name (a symbol or a string) as a new timezone, lazy-loaded from zone-file (a pathname designator relative to the zoneinfo directory on this system.	If load is true, load immediately."
    (let ((zone-sym (if (symbolp zone-name) zone-name (intern zone-name))))
  	`(prog1
  	  (defparameter ,zone-sym (make-timezone :path ,zone-file))
  	  ,@(when load
  			  `((realize-timezone ,zone-sym))))))
  
  (defvar *default-timezone*)
  (eval-when (:load-toplevel :execute)
  