I found that on my pc (LC_CTYPE=it_IT.UTF-8) "ls -l" will output date in italian, while ctime(..) will return a string in english (LANG=C). I've tried using setlocale(LC_ALL, NULL) with no result.
I don't know If I can have ctime(..) output on locale language.
BUT! I changed:
char ls_path[MAX_CMD_SIZE] = "/bin/ls";
to:
char ls_path[MAX_CMD_SIZE] = "LANG=C /bin/ls";
and I had "ls -l" date output in english!
So I can test my ft_ls.
I don't know if you wanna change this because maybe there is a hack for ctime(..)
I found that on my pc (LC_CTYPE=it_IT.UTF-8) "ls -l" will output date in italian, while ctime(..) will return a string in english (LANG=C). I've tried using setlocale(LC_ALL, NULL) with no result. I don't know If I can have ctime(..) output on locale language. BUT! I changed: char ls_path[MAX_CMD_SIZE] = "/bin/ls"; to: char ls_path[MAX_CMD_SIZE] = "LANG=C /bin/ls"; and I had "ls -l" date output in english! So I can test my ft_ls. I don't know if you wanna change this because maybe there is a hack for ctime(..)