Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!fdls!dougw From: dougw@fdls.UUCP (Doug Walker) Newsgroups: comp.sys.ncr Subject: Re: Date Error on 4920 and 4940 Terminals Message-ID: <195@fdls.UUCP> Date: 20 Mar 90 06:02:01 GMT References: <193@fdls.UUCP> Reply-To: dougw@fdls.UUCP (Doug Walker) Distribution: comp.sys.ncr Organization: Oregon Department Of Agriculture, Salem, OR Lines: 43 Mike Nolan posted a shell script to modify the date and time on an NCR 4940 terminal and asked for refinements. We currently use this C program to perform this function on our NCR 32/650 under 02.01.01: /* Courtesy of Northwest Analytical, Portland, Oregon */ #include main () { long tod; /* Time of day in seconds */ struct tm *ct; /* Time fields */ time(&tod); ct = localtime(&tod); printf("\033\001\015%02d\016%02d\017%02d", ct->tm_mday, ct->tm_mon+1, ct->tm_year); printf("\025%02d\026%02d\037", ct->tm_min, ct->tm_hour); } Also, here's a short shell script by Joel Barton, Oregon Department of Agriculture, that will also do the job: set `date '+%d %m %y %M %H'` echo "^[^A^M$1^N$2^O$319^U$4^V$5^_" The ^'s represent a CTRL v typed in vi. Also, the $319 will need to be changed to $320 for the 21st century. -- ----------------------------------------------------------------- Doug Walker | email: uunet!fdls!dougw | Oregon Department of Agriculture | Tel: (503) 378-3790 | Food and Dairy Division | Fax: (503) 378-5529 | 635 Capitol Street NE | | Salem, OR 97310-0110 | | ------------------------------------------------------------------