From 9f8be6cf60e08f0cb23e5c61a7137b5dd470ab2c Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Fri, 8 May 2020 14:26:12 +0200 Subject: [PATCH] debug --- main.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/main.c b/main.c index 24e5f8e..d8b4c0c 100644 --- a/main.c +++ b/main.c @@ -26,22 +26,11 @@ int isinarray( int pid, int array[], int n ) char* frtime(const time_t timet) { - int jour; 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]; + date_tm = localtime(&timet); 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; } @@ -254,7 +243,7 @@ int main() char date[60]; time_t now ; - setlocale(LC_ALL,"fr_FR.UTF-8"); + setlocale(LC_ALL,NULL); time( &now ); sprintf( date, "%s", ctime(&now)); date[strlen(date)-1] = 0;