From dfcbb89717cd6e1fe004e16b9fb339282c3e0f6e Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Fri, 8 May 2020 15:32:55 +0200 Subject: [PATCH] date locale set to fr --- main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index f0514f7..d1fad56 100644 --- a/main.c +++ b/main.c @@ -244,14 +244,13 @@ int main(int argc,char **argv,char** envp) time_t now ; char * locale; char * language; - char * ptr; + //char * ptr; language = getenv("LANGUAGE"); - ptr = strtok (language, ":"); -locale = setlocale(LC_ALL,""); - locale = setlocale(LC_ALL,ptr); + strtok (language, ":"); + locale = setlocale(LC_ALL,language); time( &now ); - sprintf( date, "%s", ctime(&now)); + sprintf( date, "%s", frtime(now)); date[strlen(date)-1] = 0; if ( (fh = fopen(logfile, "a")) == NULL) {