From: Ed Wensell III aka THE StormRaiser <ewensell@pstcc.cc.tn.us.net>
Subject: Re: timestamp (unix time)
Date: 1998/12/02 [thread overview]
Message-ID: <366542CE.7893@pstcc.cc.tn.us.net> (raw)
In-Reply-To: 7437b5$a86@globo.edinfor.pt
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?
next prev parent reply other threads:[~1998-12-02 5:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-02 5:00 timestamp (unix time) Pedro Nobre
1998-12-02 5:00 ` Ed Wensell III aka THE StormRaiser [this message]
1998-12-02 5:00 ` Pedro Nobre
1998-12-03 5:00 ` Boyd Adamson
1998-12-03 5:00 ` Jeffrey Mogul
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox