1
2
3
4
5
6
7
8
9
10
11
12
#include <sys/types.h>
#include <time.h>
#include <iostream>

int main()
{
    time_t x = -2147474649;
    tm* tmm;
    tmm = localtime(&x);
    std::cout << tmm->tm_wday << std::endl;
    return 0;
}