From: kranthi <kranthi@effigent.net>
To: "Lejanson C. Go" <lejanson@ntsp.nec.co.jp>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: time conversion
Date: Tue, 23 Aug 2005 14:07:56 -0000 [thread overview]
Message-ID: <opsvyr7isqcqhltn@effigent.org> (raw)
In-Reply-To: <430AD085.7070004@hq.ntsp.nec.co.jp>
I think this may serve u r purpose
#include <stdio.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
int main()
{
time_t t; //Number in Unsigned format
printf("% u \n ",t);
time(&t);
printf("%s",ctime(&t)); // Time in Human readable format
return 0;
}
On Tue, 23 Aug 2005 15:30:13 +0800, Lejanson C. Go
<lejanson@ntsp.nec.co.jp> wrote:
> Hi,
>
> I had searched the net on how to convert unsigned long timestamp
> to human readable format or maybe in struct timeval format. Any sample
> code that you can share would be greatly appreciated.
> Thanks.
>
> Lejanson
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-c-programming" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
next prev parent reply other threads:[~2005-08-23 14:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-23 7:30 time conversion Lejanson C. Go
2005-08-23 7:42 ` Nanakos Chrysostomos
2005-08-23 14:07 ` kranthi [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-08-24 2:21 Suma Choudhary
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=opsvyr7isqcqhltn@effigent.org \
--to=kranthi@effigent.net \
--cc=lejanson@ntsp.nec.co.jp \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.