Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Convertir la valeur du timer en année, mois, jour, heure, minute et seconde


{filelink=13338}

  #include <time.h>
  #include <stdio.h>
 
 #define GB (-1)
 #define FR (0)
 
  int main(void)
  {
   time_t hr_t;
  struct tm * ptm;
 
  time ( &hr_t );
 
  ptm = gmtime ( &hr_t );
 
  puts ("Heure:");
  printf (" En Angleterre :  %2d:%02dn", (ptm->tm_hour+GB)%24, ptm->tm_min);
  printf (" En France: %2d:%02dn", (ptm->tm_hour+FR)%24, ptm->tm_min);
 
    return 0;
  }

No comments yet.

Leave a Comment