Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!ROHVM1.BITNET!MBDMD From: MBDMD@ROHVM1.BITNET Newsgroups: comp.lang.asm370 Subject: (none) Message-ID: <8912191618.AA14620@brazos.rice.edu> Date: 18 Dec 89 14:40:13 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: IBM 370 Assembly Programming Discussion List Distribution: inet Organization: The Internet Lines: 36 Subject: TOD clock and the year 2043 Does anyone have a set of Assembler routines that convert from a TOD clock value to a date and time? Is it as easy as getting the clock value into a pair of registers, shifting the pair of registers to the right 12 bits to get the number of micro seconds since January, 1, 1900, divide that by 1000000 to convert to seconds and then calculate the year, month, day, hours, minutes, and seconds since 1/1/1900 without forgetting about leap years? Although there sounds like quite a few steps none of the steps are very difficult. I would be interested in seeing routines that anyone else has that they would be willing to share. We are in the process of rewriting all of our date routines. They will all break before the year 2000. Way back when these routines were written the programmers never imagined that they would still be in production through the 90's. We have been asked to rewrite these routines so they will never break. We have run into a small problem that I am not sure how to resolve. From the TOD clock we can calculate the date and time. According to Principles of Operations, TOD clocks will wrap in approximately the year 2043. How can you calculate a date with a century after the year 2043? If the TOD clock wraps in the year 2043 how can we calculate the current century. Does anyone have any suggestion on how to get the century after 2043? Is everyone going to retire before 2043 and really don't care? Any help would be appreciated. Thanks, Martin J. Doyle VM Systems Programming Contractor Rohm and Haas Company Philadelphia, Pennsylvania MBDMD@ROHVM1 (215) 752-2296