[comp.sys.handhelds] HP71 DATE bug

jpser@cup.portal.com (John Paul Serafin) (09/16/90)

   On the transition from 1990 February 28 to 1990 March 01, the DATE function
on the HP71  began returning a result 1 greater than would be expected.   The
SETDATE keyword expects, and the DATE function returns an integer of the form
YYDDD where YY is the last 2 digits of the year and DDD the day number of the
year, so 1990 Sep 15 is 90258.   The command line:
           SETDATE 90258 @ DATE,DATE$
results in the display:
           90259        90/09/15
   Note that the DATE$ string is correct.
   The Data Acquisition ROM for the HP71 has a function DCNV$(yyddd) which
returns a string identical to the string returned by the native function
DATE$ except that it knows nothing about the increment beginning on March
first.   This causes the date to be incorrect on printouts made with 
programs in the Data Acquisition ROM.   Random checks do not reveal any
problems in previous years.   The odd years in this decade appear to be OK.
On the leap years '92 & '96, DATE will return 1 LESS.   In '94 & '98 behavior
will be the same as this year.
   An amusing leap day feature is that:
           SETDATE 92060 @ DATE,DATE$
returns:
           92060        92/02/29
and
           SETDATE 92061 @ DATE,DATE$
returns:
           92060        92/03/01
thus two consecutive days have the same day number!   Of course, internally
the HP71 represents time as the number of 1/512 seconds since midnight
0000 Jan 1.   Judicious POKE's into 2F70D will reveal how DATE behaves in
other ceturies.
   My conclusion is that the DATE routine has a problem.   I don't know the
entry point for DATE, but presumably anyone who can disassemble and figure
out what is going on can find it.
   Would anyone out there with Volume III of the IDS care to track this down?
                                         John Serafin
                                         jpser@cup.portal.com