Raymond Toy pushed to branch rtoy-issue-26 at cmucl / cmucl

Commits:

2 changed files:

Changes:

  • src/code/time.lisp
    ... ... @@ -223,8 +223,11 @@
    223 223
    	   (type (mod 24) hour)
    
    224 224
    	   (type (integer 1 31) date)
    
    225 225
    	   (type (integer 1 12) month)
    
    226
    	   (type (or (integer 0 99) (integer 1900)) year)
    
    227
    	   (type (or null rational) time-zone))
    
    226
    	   ;; 1899 to account for time zones that are equivalent to 1900.
    
    227
    	   (type (or (integer 0 99) (integer 1899)) year)
    
    228
    	   (type (or null rational) time-zone)
    
    229
    	   ;; Result must be non-negative integer!
    
    230
    	   (values (integer 0)))
    
    228 231
      (let* ((year (if (< year 100)
    
    229 232
    		   (pick-obvious-year year)
    
    230 233
    		   year))
    

  • tests/issues.lisp
    ... ... @@ -348,6 +348,11 @@
    348 348
                                      '(".dir" "dir")
    
    349 349
                                      :test #'string-equal)))))
    
    350 350
    
    
    351
    (define-test issue.36
    
    352
        (:tag :issues)
    
    353
      (loop for k from 1 to 24 do
    
    354
        (assert-equal 0 (encode-universal-time 0 0 (- 24 k) 31 12 1899 k))))
    
    355
    
    
    351 356
    (define-test issue.26
    
    352 357
        (:tag :issues)
    
    353 358
      (let ((start-time (get-universal-time)))