I do not know the data type of time_t
. Is it a float double or something else? Because if I want to display it I need the tag that corresponds with it for printf
. I can handle the rest from there for displaying time_t
but I need to know the data type that corresponds with it.
It's platform-specific. But you can cast it to a known type.
printf("%lld\n", (long long) time(NULL));