From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII X-Google-Thread: fee84,8472dae0dfdcba15 X-Google-Attributes: gidfee84,public From: "Pedro Nobre" Subject: Re: timestamp (unix time) Date: 1998/12/02 Message-ID: <743p02$8ps1@globo.edinfor.pt>#1/1 X-Deja-AN: 417888562 References: <7437b5$a86@globo.edinfor.pt> <366542CE.7893@pstcc.cc.tn.us.net> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Edinet Newsgroups: comp.unix.osf.osf1 Thanks, but that isn�t realy what i�m looking for. You are write, i'm making a shell script, but let me explain it better: Unix stores date in a long integer that represents the number of seconds since Jan,1,1970. What i pretend is something that decodes a number, say "912614795", to a date "02-12-1998 16:05:31" corresponding to that number. Pedro Ed Wensell III aka THE StormRaiser wrote in message <366542CE.7893@pstcc.cc.tn.us.net>... >Pedro Nobre wrote: >> >> Hello all, >> >> I need to convert the unix time to a string. >> I already know that there is a c function (ctime) in a unix library (time.h) >> that does that. >> The problem is that i don't have a c compiler in my machine. >> Does anyone knows the algorithm to do that? > >So shall we assume you are making a shell script? > >In C-Shell, you could try: > > $ set DATE=`date` > $ echo $DATE > Wed Dec 2 08:29:09 EST 1998 > >In Bourne or Korn Shell: > > $ DATE=`date` > $ echo $DATE > Wed Dec 2 08:34:29 EST 1998 > >Check out the man pages on date to see how you can manipulate the >date/time output format to suit your needs. Regardless of format, the >output is in string unless otherwise conoluted. > >Now if I am missing what you are trying to do, please try to provide >more info and someone else will probably take a crack at it... > >-- > >Until soon... >Ed Wensell III >Systems and Operations Support, Pellissippi State >E-mail hint: A college with a dot net domain?