Sample Header Ad - 728x90

Why does gmtime() give days 1-31, but months 0-11?

26 votes
3 answers
1826 views
The 'gmtime()' standard library function returns a struct that has days numbered 1-31, but months numbered 0-11. Why is that? Presumably there is some historic reason?
Asked by ああああああああああああああああああああああああああああああ (444 rep)
Jul 11, 2025, 10:04 AM
Last activity: Jul 15, 2025, 01:57 PM