Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

C: Affichage de date et heure en GMT

 date
{filelink=13886}

#include <time.h>
#include <stdio.h>
 
int main(void)
{
  struct tm *local;
  time_t t;
 
  t = time(NULL);
 
  local = localtime(&t);
 
  printf("Date et heure locale: %s", asctime(local));
 
  printf( "Date: %.24s GMTn", asctime( gmtime( &t ) ));
 
  return 0;
}

No comments yet.

Leave a Comment