C: Affichage de date et heure en GMT

Author:

 date
{filelink=13886}

#include 
#include 

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;
}

Leave a Reply

Your email address will not be published. Required fields are marked *