linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Masters <jonmasters@gmail.com>
To: szonyi calin <caszonyi@yahoo.com>
Cc: Ankit Jain <ankitjain1580@yahoo.com>,
	linux prg <linux-c-programming@vger.kernel.org>
Subject: Re: Unix Time
Date: Mon, 27 Sep 2004 12:57:42 +0100	[thread overview]
Message-ID: <35fb2e59040927045735974a2a@mail.gmail.com> (raw)
In-Reply-To: <20040927105947.64643.qmail@web52904.mail.yahoo.com>

On Mon, 27 Sep 2004 12:59:47 +0200 (CEST), szonyi calin
<caszonyi@yahoo.com> wrote:

> to convert a number of secconds in actual time:
> a minute has 60 seconds
> an hour has 60 minutes = 3600 seconds
> a day has 24 hours = 86400 seconds

...but don't use this because over the period of seconds since epoch
(January 1 1970 is when UNIX began counting time) it'll not take in to
account leap seconds and the like - so you'll cunningly be out of time
by a little in every calculation.

No. Use the standard POSIX time functions instead - e.g. localtime()
to give you the view of time for where you are in the world.

Cheers,

Jon.

  reply	other threads:[~2004-09-27 11:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-26 14:02 Unix Time Ankit Jain
2004-09-27  3:01 ` Suciu Flavius
2004-09-26 22:57   ` Jon Masters
2004-09-27  5:10     ` Ankit Jain
2004-09-27 10:59       ` szonyi calin
2004-09-27 11:57         ` Jon Masters [this message]
2004-09-27 21:33           ` Sumit Narayan

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=35fb2e59040927045735974a2a@mail.gmail.com \
    --to=jonmasters@gmail.com \
    --cc=ankitjain1580@yahoo.com \
    --cc=caszonyi@yahoo.com \
    --cc=jonathan@jonmasters.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).