From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,172dcc28d2930c96 X-Google-Attributes: gid111c93,public From: "G. Hugh SONG" Subject: Very much confused with clock (was Re: Unix system g77 calls DATE and TIME not working for Alpha/Linux) Date: 1998/10/19 Message-ID: <70facb$1f2$1@news.kjist.ac.kr>#1/1 X-Deja-AN: 402780864 Content-Transfer-Encoding: 7bit References: <70cpag$81m$1@news.kjist.ac.kr> <70ds7g$2cg@news1.newsguy.com> Content-Type: text/plain; charset=us-ascii Organization: KJIST, KwangJu, KOREA Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha Greg Lindahl wrote: > "G. Hugh SONG" writes: > > I noticed that since g77 0.5.20, unix f77 system calls, > > "call date" and "call time" silently have been working, which > > means that they are not documented. (Well, we are not supposed to > > expect an official g77 document till version 1.0 comes out.) > > > > The syntax is: > > > > character chdate*9, chtime*8 > > c Unix calls > > call date(chdate) > > call time(chtime) > > print*, chtime, chdate > > > > Unfortunately, under Linux/Alpha, they don't seem to give the > > correct date/time character strings. > > [lindahl@spare-parts lindahl]$ cat > test.f > program test > character chdate*9, chtime*8 > c Unix calls > call date(chdate) > call time(chtime) > print*, chtime, chdate > stop > end > [lindahl@spare-parts lindahl]$ g77 test.f > /a.out > [lindahl@spare-parts lindahl]$ ./a.out ; date > 19:03:1118-Oct-98 > Sun Oct 18 19:03:11 EDT 1998 > > Works great for me. If your system clock is wrong, I wouldn't be > surprised if g77 prints the same thing as the system clock. The answer > for configuring your overall Linux/Alpha system clock is in the > Linux/Alpha FAQ. > > -- g Huh!? I got confused. VERY MUCH indeed. May I show my problem one by one? As a non-root user: $ date Mon Oct 19 20:13:52 KST 1998 $ clock clock: unable to get I/O port access $ cat /etc/sysconfig/clock UTC=false ARC=true Is my configuration file correct? On a FAQ, it was written that UTC should also be set to true. On another article, someone said my configuration is all right. As the root; # /sbin/clock -Ar Wed Feb 27 02:26:26 2008 # /sbin/clock -rA Mon Oct 19 20:27:48 1998 # /sbin/clock -Ar [a while later] Mon Oct 19 21:09:32 1998 ------------------------------- Isn't this funny? "-Ar" and "-rA" are different? Yesterday, the above fortran test program did not give the right time although the "date" command worked. Today, after a cold-reboot, the above fortran test program works now as desired. BTW, I ftped "clock-pc164-rh50" from ftp://ftp.digital... What am I supposed to do with this? Would I do the following? $ mv clock-pc164-rh50 /sbin/clock $ chmod 755 /sbin/clock Finally, I would like to ask a question again. I think I heard that warm roboot is not good for Alpha/Linux due to this clock problem. If that;s true, the above "clock" cure is only secondary. What is the real problem? My system is LX164. Thank you very much for all the help -- G. Hugh Song PS: Please remove "Spamspoiler" when replying for spam extractors, FCC Commisioners' email addresses are: wkennard@fcc.gov,sness@fcc.gov,pmisener@fcc.gov,mpowell@fcc.gov