linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J." <mailing-lists@xs4all.nl>
To: linux-c-programming@vger.kernel.org
Subject: <time.h>: gmtime keeps giving the same time ....
Date: Thu, 8 May 2003 21:47:20 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.21.0305082139410.13103-100000@hestia> (raw)
In-Reply-To: <20030507154442.GQ674@gre.ac.uk>

Hello,

Output from the date `command` in my terminal:
Thu May  8 21:42:28 CEST 2003

Output from my `problem'_program.c
19

#include <stdio.h>
#include <time.h>

int main(void) {
 struct tm *tm_ptr;
 time_t the_time;

 (void)time(&the_time);
 tm_ptr = gmtime(&the_time);

 printf("tm_ptr->tm_hour = %d\n", tm_ptr->tm_hour);

 return 0;
}

No matter what I do, this C - code keeps giving me as output 19.

Is my system messed up or my head ?

Any thoughts are more than welcome

Thnkx....

J.


  reply	other threads:[~2003-05-08 19:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-07 15:44 warning: assignment makes integer from pointer without a cast Martin Buchan
2003-05-08 19:47 ` J. [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-05-09  2:56 <time.h>: gmtime keeps giving the same time Ranga Reddy M - CTD ,Chennai.

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=Pine.LNX.4.21.0305082139410.13103-100000@hestia \
    --to=mailing-lists@xs4all.nl \
    --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).