[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Universal time makes me sad
- To: firstname.lastname@example.org
- Subject: Universal time makes me sad
- From: email@example.com (Russell Owen)
- Date: Mon, 8 Feb 1993 15:58:15 -0500
- Cc: firstname.lastname@example.org
- Sender: email@example.com
I am still Lisping and life if pretty grand, however I have some very
strange behaviour in my program having to do with converting universal
time into seconds, minutes, hours etc. I have written a program which
demonstrates this problem. I hope someone can either point out the
error I am making or patch the interpreter.
I am running System Software 7.0 on a Mac IIfx with 20 Meg of memory.
Virtual memory is off, 32 bit addressing is on. I have MCL 2.0 from the
CD to which I have applied two patches bringing me to version 2.0p2.
Lisp is set to 6 Meg of memory. Given the following program:
(defun test-time ()
(do ((year 1993)
(setf month (1+ (random 11)))
(setf day (1+ (random 27)))
(setf hours (random 23))
(setf minutes (random 59))
(setf seconds (random 59))
(encode-universal-time seconds minutes hours day month year 5))
(multiple-value-bind (seconds minutes hours day month newyear)
(when (not (eq year newyear))
(print-db year newyear)))))
The following output is produced:
The error is sporadic i.e. decode-universal-time returns rational values
most of the time.
Does anyone have any comments on this?