Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Genera Y2K patch (long msg)

62 views
Skip to first unread message

Scott L. Burson

unread,
May 22, 1998, 3:00:00 AM5/22/98
to

To any remaining users of Symbolics Genera,

I have been looking around in the Genera 8.3 sources for potential Y2K
bugs. I found two cosmetic bugs and one slightly more serious. The
patch file below should fix these.

The cosmetic bugs are both of the form where a date was being printed
using YEAR - 1900. As they stood, these would have produced stuff like
"1/1/100" for 1 Jan 2000. More bugs of this kind probably remain (a
couple, I suspect, in undistributed sources).

The slightly more serious bug concerns reading the hardware calendar
clock. This clock (at least on an XL) stores only a two-digit year.
The code as it was simply returned NIL if the year was outside the range
85 <= Y <= 99, which would have caused the machine, during a cold boot,
to ignore the calendar clock once it rolled over, whereupon it would
first have tried to read the time from the network, and if that failed,
would have asked the user. So the patch is perhaps primarily of
interest to those who don't have a time server on their network.

(I do not represent Symbolics in any way -- I'm just a user.)

BTW you should also be aware of TIME:*DATE-PRINTING-FORMAT*, which can
be one of the symbols :MM/DD/YY, :MM/DD/YYYY, :DD-MMM-YY, :DD-MMM-YYYY,
or :ISO (the latter behaves as YYYY-MM-DD; I don't know which ISO
standard this is or why Symbolics didn't just write it that way). This
variable can be set directly or as the DATE-PRINTING-FORMAT user
property of the site object in the namespace editor, e.g.:

User Property: DATE-PRINTING-FORMAT MM/DD/YYYY

-- Scott

* * * * *

To use the email address, remove all occurrences of the letter "q".


*************************************************************************

;;; -*- Mode: LISP; Syntax: Zetalisp; Package: USER; Base: 10;
Patch-File: T -*-
;;; Patch file for Private version 0.0
;;; Reason: Function LMFS:BACKUP-DUMP-MAP-PATH: Y2K cosmetic fix.
;;; Function LMFS:RELOADER-ERROR-LOG-PATH: Y2K cosmetic fix.
;;; Function TIME:READ-CALENDAR-CLOCK: Y2K bug.
;;; Written by Gyro, 4/20/98 16:22:26
;;; while running on Dionysos from FEP10:>Genera-8-3-ZSL-Di.ilod.1
;;; with Genera 8.3, Logical Pathnames Translation Files NEWEST, Ivory
Revision 4A,
;;; FEP 328, FEP10:>I328-loaders.flod(24), FEP10:>I328-info.flod(24),
;;; FEP10:>I328-debug.flod(24), FEP10:>I328-lisp.flod(25),
;;; FEP10:>I328-kernel.fep(44), Boot ROM version 316, Device PROM
version 330,
;;; 1210x880 8-bit PSEUDO-COLOR X Screen GANESH:0.0 with 224 Genera
fonts (MIT X Consortium R5000),
;;; 1135x833 B&W Screen, Machine serial number 767.

;;; Patch file for Private version 0.0
;;; Written by Gyro, 1998-05-22 02:08:27
;;; while running on Dionysos from FEP10:>Genera-8-3-ZSL-Di-2.ilod.1
;;; with Genera 8.3, Logical Pathnames Translation Files NEWEST, Ivory
Revision 4A,
;;; FEP 328, FEP10:>I328-loaders.flod(24), FEP10:>I328-info.flod(24),
;;; FEP10:>I328-debug.flod(24), FEP10:>I328-lisp.flod(25),
;;; FEP10:>I328-kernel.fep(44), Boot ROM version 316, Device PROM
version 330,
;;; 1152x878 8-bit PSEUDO-COLOR X Screen GANESH:0.0 with 224 Genera
fonts (MIT X Consortium R5000),
;;; 1135x833 B&W Screen, Machine serial number 767,
;;; Genera 8.3 patches for Gyro. (from
D:>gyro>lispm>genera-8-3-patches.lisp.2).

(SCT:FILES-PATCHED-IN-THIS-PATCH-FILE
"SYS:LMFS;DUMPER.LISP.3040"
"SYS:LMFS;RELOADER.LISP.3044"
"SYS:IO1;TIME.LISP.195")


(SCT:NOTE-PRIVATE-PATCH "Genera 8.3 patches for Gyro.")


;========================
(SCT:BEGIN-PATCH-SECTION)
(SCT:PATCH-SECTION-SOURCE-FILE "SYS:LMFS;DUMPER.LISP.3040")
(SCT:PATCH-SECTION-ATTRIBUTES
"-*- Mode:LISP; Package:LMFS; Base:8; Lowercase:T -*-")

(defun backup-dump-map-path ()
(let ((map-path (fs:parse-pathname ">dump-maps>foo.map"
net:*local-host*)))
(fs:create-directories-recursively map-path)
(send map-path :new-name (multiple-value-bind (nil min hr day mon
yr)
(time:decode-universal-time *backup-dump-start-time*)
(format nil "~A-~D//~D//~D-~D:~2,48D"
(string-downcase *backup-dump-type*)
mon day (+ yr 1900) hr min)))))


;========================
(SCT:BEGIN-PATCH-SECTION)
(SCT:PATCH-SECTION-SOURCE-FILE "SYS:LMFS;RELOADER.LISP.3044")
(SCT:PATCH-SECTION-ATTRIBUTES
"-*- Syntax: Zetalisp; Mode: LISP; Package: LMFS; Base: 8; Lowercase:
T -*-")

(defun reloader-error-log-path (time)
(let ((log-path (fs:parse-pathname ">reload-logs>reloader.log"
net:*local-host*)))
(send log-path :new-name (multiple-value-bind (nil min hr day mon
yr)
(time:decode-universal-time time)
(format nil "~A-~D//~D//~D-~D:~2,48D"
"reload"
mon day (+ 1900 yr) hr min)))))


;========================
(SCT:BEGIN-PATCH-SECTION)
(SCT:PATCH-SECTION-SOURCE-FILE "SYS:IO1;TIME.LISP.195")
(SCT:PATCH-SECTION-ATTRIBUTES
"-*- Mode:LISP; Package:TIME; Base:8 -*-")

(DEFUN READ-CALENDAR-CLOCK (&OPTIONAL EVEN-IF-BAD)
(DECLARE (VALUES UT-OR-NIL))
(MULTIPLE-VALUE-BIND (SECONDS MINUTES HOURS DAY MONTH YEAR
DAY-OF-WEEK)
(PROGN
#+3600
(FUNCALL (SELECTQ SYS:*IO-BOARD-TYPE*
(:OBS #'SI:READ-CALENDAR-CLOCK-INTERNAL)
(:NBS #'CLI::NBS-READ-CALENDAR-CLOCK-INTERNAL))
EVEN-IF-BAD)
#+IMACH
(SYS:SYSTEM-CASE
(Solstice
(MULTIPLE-VALUE-BIND (SECONDS MINUTES HOURS DAY MONTH YEAR
DAY-OF-WEEK)
(CLI::SOLSTICE-READ-CALENDAR-CLOCK-INTERNAL)
(IF SECONDS
(VALUES SECONDS MINUTES HOURS DAY MONTH YEAR DAY-OF-WEEK)
(CLI::MERLIN-READ-CALENDAR-CLOCK-INTERNAL EVEN-IF-BAD))))
((Merlin Zora)
(CLI::MERLIN-READ-CALENDAR-CLOCK-INTERNAL EVEN-IF-BAD))
(MACIVORY
(MACINTOSH-INTERNALS::MACIVORY-READ-CALENDAR-CLOCK-INTERNAL))
(Domino
(CLI::DOMINO-READ-CALENDAR-CLOCK-INTERNAL EVEN-IF-BAD))
(OTHERWISE NIL)))
DAY-OF-WEEK ;not needed
(AND SECONDS ;values returned
(AND (<= 0 SECONDS 59.)
(<= 0 MINUTES 59.)
(<= 0 HOURS 23.)
(<= 1 MONTH 12.))
(TIME:ENCODE-UNIVERSAL-TIME SECONDS MINUTES HOURS DAY MONTH
(IF (<= YEAR 80) (+ YEAR 100) YEAR)
0))))

Erik Naggum

unread,
May 22, 1998, 3:00:00 AM5/22/98
to

* Scott L. Burson

| BTW you should also be aware of TIME:*DATE-PRINTING-FORMAT*, which can
| be one of the symbols :MM/DD/YY, :MM/DD/YYYY, :DD-MMM-YY, :DD-MMM-YYYY,
| or :ISO (the latter behaves as YYYY-MM-DD; I don't know which ISO
| standard this is or why Symbolics didn't just write it that way).

FWIW, ISO 8601:1988 Data Elements and Interchange Formats -- Information
Interchange -- Representation of Dates and Times (+ Technical Corrigendum
1:1991) is the latest incarnation of the "ISO date and time format"
standard, but ISO 8601 was itself a "consolidated standard" from several
older standards that dealt with dates, times, weeks, etc, separately
because they came from different sponsoring organizations.

#:Erik
--
"Where do you want to go to jail today?"
-- U.S. Department of Justice Windows 98 slogan

Barry Margolin

unread,
May 22, 1998, 3:00:00 AM5/22/98
to

In article <31048370...@naggum.no>, Erik Naggum <er...@naggum.no> wrote:
>* Scott L. Burson

>| BTW you should also be aware of TIME:*DATE-PRINTING-FORMAT*, which can
>| be one of the symbols :MM/DD/YY, :MM/DD/YYYY, :DD-MMM-YY, :DD-MMM-YYYY,
>| or :ISO (the latter behaves as YYYY-MM-DD; I don't know which ISO
>| standard this is or why Symbolics didn't just write it that way).
>
> FWIW, ISO 8601:1988 Data Elements and Interchange Formats -- Information
> Interchange -- Representation of Dates and Times (+ Technical Corrigendum
> 1:1991) is the latest incarnation of the "ISO date and time format"
> standard, but ISO 8601 was itself a "consolidated standard" from several
> older standards that dealt with dates, times, weeks, etc, separately
> because they came from different sponsoring organizations.

And Symbolics presumably chose the keyword :ISO both because it's short and
memorable, and also because pretty much everyone refers to YYYY-MM-DD as
"ISO date format". Symbolics wasn't coining the term, just using common
industry jargon.

--
Barry Margolin, bar...@bbnplanet.com
GTE Internetworking, Powered by BBN, Cambridge, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.

0 new messages