Answer the question
In order to leave comments, you need to log in
Why does mktime never return -1?
I convert the struct tm structure to time_t with the mktime function , which should return -1 if the values are incorrect. But in my case, this does not happen, that is, even if I specify tm_mday = 32, then mktime will not return -1, but will return the number of seconds, but already from the first day of the next month, if we translate seconds into human form.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question