debug
This commit is contained in:
parent
a4ef2ec020
commit
9f8be6cf60
15
main.c
15
main.c
@ -26,22 +26,11 @@ int isinarray( int pid, int array[], int n )
|
|||||||
|
|
||||||
char* frtime(const time_t timet)
|
char* frtime(const time_t timet)
|
||||||
{
|
{
|
||||||
int jour;
|
|
||||||
struct tm *date_tm;
|
struct tm *date_tm;
|
||||||
|
|
||||||
static const char nomjour[][10] = {
|
|
||||||
"Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"
|
|
||||||
};
|
|
||||||
static const char nommois[][10] = {
|
|
||||||
"Janvier", "Fevrier", "Mars", "Avril", "Mai", "Juin",
|
|
||||||
"Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"
|
|
||||||
};
|
|
||||||
static char result[40];
|
static char result[40];
|
||||||
|
|
||||||
date_tm = localtime(&timet);
|
date_tm = localtime(&timet);
|
||||||
strftime(result, 40, "%c", date_tm);
|
strftime(result, 40, "%c", date_tm);
|
||||||
jour = atoi(result);
|
|
||||||
strftime(result, 40, "%d/%m/%y à %x", date_tm);
|
|
||||||
sprintf(result, "%d %s", jour, result);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,7 +243,7 @@ int main()
|
|||||||
char date[60];
|
char date[60];
|
||||||
time_t now ;
|
time_t now ;
|
||||||
|
|
||||||
setlocale(LC_ALL,"fr_FR.UTF-8");
|
setlocale(LC_ALL,NULL);
|
||||||
time( &now );
|
time( &now );
|
||||||
sprintf( date, "%s", ctime(&now));
|
sprintf( date, "%s", ctime(&now));
|
||||||
date[strlen(date)-1] = 0;
|
date[strlen(date)-1] = 0;
|
||||||
|
Reference in New Issue
Block a user