Path: news.uiowa.edu!chi-news.cic.net!nntp.coast.net!news-res.gsl.net!news.gsl.net!news.mathworks.com!enews.sgi.com!decwrl!nntp.crl.com!crl13.crl.com!not-for-mail From: joko@crl.com (Joe Kohn) Newsgroups: comp.sys.apple2 Subject: Re: Clock-setting program Date: 3 Aug 1996 10:16:15 -0700 Organization: CRL Dialup Internet Access (415) 705-6060 [Login: guest] Lines: 141 Message-ID: <4u01gv$oah@crl13.crl.com> References: <31FF8246.F06@wsunix.wsu.edu> <4ttmke$63p@news.asu.edu> NNTP-Posting-Host: crl13.crl.com X-Newsreader: TIN [version 1.2 PL2] This is Brian Wells' PT3.SETTIME macro. If you have ProTerm, you can execute this macro and it will call an Atomic Clock in Colorado, and set your IIGS clock to the correct time. It only dials at 1200 bps, as that's the top speed of the modem you'll call. But, even at 1200, you'll only be online for a few seconds. Cut below the line, and save the macro, and then to use it, access the Misc Menu's Macro File option, choose PT3.SETTIME and click on the Exec button. ------------------------------- ; NIST-ACTS Time macros for ProTERM v1.0 ; ; Copyright (c) 1994 by Brian D. Wells ; ; Internet: b.wells5@genie.geis.com ; ; In these macros, the current system date is used, ; not the one returned by ACTS. %%1 if ($D),{do "fi:qu"} if ($O),{no "Unable to dial..." ex 1} me 47110,"8B4BAB18FBC230AD00B848AD02B848AD04B848A2030E220000E138FBAB60" me 47140,"8B4BAB18FBC23048484848A2030D220000E168688D02B8688D00B86838FBAB60" jsr 47140 ; Init Date ca %5 pr#2,"^MCopyright (c) 1994 by Brian D. Wells Internet: b.wells5@genie.geis.com^M" pr#2,"^M^MThese macros will call up the National Institute of Standards " pr#2,"and Technology's^MAutomated Computer Time Service in Colorado and " pr#2,"sets the Apple IIgs clock^Maccordingly. Note that the date is not " pr#2,"changed. This capability might be added^Min a later version.^M" pr#2,"^MKeep in mind that the call is most likely long distance for you. " pr#2,"However, it^Mtakes less than a minute to get the time from the service.^M" pr#2,"^MThese macros can be used as long as this copyright stays here, " pr#2,"and they aren't^Mused for outrageous profit. This means that " pr#2,"distribution on GEnie and any other^Mnetwork is allowed. Also, they " pr#2,"can be copied and distributed by disk for a^Mminimal cost of $5 or less.^M" pr#2,"^MThat all out of the way, press any key to get to the REAL macros..." ge#2,&0 ca %5 pr#2,"^M^MWhat time zone do you live in?^M^M" pr#2," 1) Atlantic Time^M" pr#2," 2) Eastern Time^M" pr#2," 3) Central Time^M" pr#2," 4) Mountain Time^M" pr#2," 5) Pacific Time^M" pr#2," 6) Alaska Time^M" pr#2,"^MPress a key to indicate your choice:" %%11 ge#2,&0 se $0=(val &0) if (or !($0),(gt $0,6)),%11 se $6=$0+3 ca %5 pr#2,"^M^MIs daylight saving time used where you live?^M^M" pr#2," 1) Yes 2) No^M" pr#2,"^MPress a key to indicate your choice:" %%12 ge#2,&0 se $0=(val &0) if (or !($0),(gt $0,2)),%12 se $7=0 if (eq $0,1),{se $7=1} vi 0 pr#2,"^M^M" do "di:qu","System:<1-303-494-4774> Baud:<1200> [re]" ; >>> Replace the phone number with 494-4774 if the call is local for you! if !($O),{no "Unable to log on..." ex 1} ca %5 %%2 wt "*",%3 "#",%4 %%3 pr#1,"*" pr#2,"^M" go %2 %%4 se &1= pr#2,"^M^M" se &0= se $1=(val &0) * year * se &0= se $2=(val &0)-1 * month * se &0= se $3=(val &0)-1 * day * se &0= se $4=(val &0) * hour * se &0= se $0=(val &0) me 47109,$0 * minute * se &0= se $0=(val &0) me 47108,$0 * second * se &0= se $0=(val &0) se $5=0 * DST * if ($7),{ if (and (gt $0,1 ),(lt $0,51)),{se $5=1} if (and (eq $0,1 ),(lt $4,2 )),{se $5=1} if (and (eq $0,51),(gt $4,1 )),{se $5=1} } se $6=$6-$5 if (lt $4,$6),{ se $0=$6-$4 se $4=24-$0 se $6=0 ; We would decrease the day here, and fix the month/year, ; but I didn't have the time to put this in :) } se $4=$4-$6 me 47106,$4 pr#2,"Setting time...^M^M" jsr 47110 * call WriteTimeHex * pr#2,"Time is now: "+ pr#2,"^MDate is now: "+ pr#2," (Fix using Control Panel if necessary.)^M^M" do "On:Ha","[Hangup]" ex 1 %%5 vi 0 pr#2,"^M^MNIST-ACTS Time setting macros v1.0^M" ex