#include <stdio.h>
#include <time.h>
#include <locale.h>
// Forcing a specific locale
int main() {
// Forcing a specific locale
setlocale(LC_TIME, "en_US.utf8");
time_t t = time(NULL);
struct tm *tm_info = localtime(&t);
char buffer[128];
strftime(buffer, sizeof(buffer), "%A, %x", tm_info); // %A Full weekday name
printf("Localized date: %s\n", buffer);
return 0;
}
/*
run:
Localized date: Sunday, 04/19/2026
*/