[Coco] Date changes for the current century

Stephen Fischer SFischer1 at Mindspring.com
Sun Apr 1 22:56:36 EDT 2018


Thanks, Robert Gault is also informing me.

The fail point being 2069 reminds me that it really does not matter if 
70 or 50 is selected as the break point.

PROCEDURE FixDate
(* Changes a five byte date into a -14 character string
(* with the dat~ in the format: lfJ:!/DD/YY HH:HM
(* D. McGarry
PAR.AM Date (S):BYTE
PAR.AM SDate:STRING[l4]
DIM Temp:BYTE
DIM I:INTEGER
SDate=""
REM remove the next 4 lines to keep date in YY/tll!/DD format
Rem Temp=Date(l )
Rem Date(l )=Date( 2)
Rem Date(2)=Date(3)
REM Date(J)=Temp
FOR I=l TO 5
SDate=SDate+RIGHT$ ("O"+STR$ (Date(I)) ,2)+MID$ ("I I 1
' ,I, 1)
NEXT I
END

OCR from Rainbow May 1985 is NOT perfext, and I used the good copy!

Only a person who teaches programming at all levels would code this line:

SDate=SDate+RIGHT$ ("O"+STR$ (Date(I)) ,2)+MID$ ("I I 1
' ,I, 1)

It took me ten minutes to understand it.

SHF

On 4/1/2018 7:26 PM, Gene Heskett wrote:
> On Sunday 01 April 2018 22:06:15 Stephen Fischer wrote:
> 
>> OK, some time looking at the OS-9 L-II manual I see that what I said
>> before is incorrect.
>>
>> The same six (6) bytes are used in OS-9 and NitrOS-9 for the system
>> date and time and five (5) bytes (With no Seconds) for File Date and
>> Time.
>>
>> I have yet to get an NitrOS-9 system running but perhaps 1950 - 1999
>> and 2000 - 2050 are chosen or some other dividing point and the
>> utilities make been changed to make the decision to add "19" or "20"
>> in front.
>>
> Day 1 for OS9,like most *nixes, is midnight, 1/1/1970.
> 
> Most of the clock chips from that era never dreamed they would still be
> in use when their 100's counter rolled over to 0=1900. So since the
> memory hadn't been allocated, the clocks that I fixed look at the chip's
> year, and if less than 70, added 100. I didn't think any farther, so if
> any of them are still running at 12/31/2069, they'll be AFU at midnight.
> I'm not gonna be around, and few of you will be either. So its a shrug
> to me. If they somehow manage to survive, someone else can fix them to
> add 200 if less than 70 or...
> 
>> So fixing "Watch" is doable and HDIRECT needs to add the "19" or "20"
>> in front. And any other utility I wrote so confusion will be avoided.
>>
>> SHF
>>
>> On 4/1/2018 10:10 AM, Stephen Fischer wrote:
>>> (* Prints an indented, hierachal directory
> 
> 
> 


More information about the Coco mailing list