开发者

something weird about members of Time.h structure [duplicate]

开发者 https://www.devze.com 2022-12-22 00:14 出处:网络
This question already has answers here: Closed 12 years ago. Possible Duplicate: Why does tm_sec range from 0-60 instead of 0-59 in time.h?
This question already has answers here: Closed 12 years ago.

Possible Duplicate:

Why does tm_sec range from 0-60 instead of 0-59 in time.h?

So when I looked up <time.h> for some info, I ran across this. I'm assuming the numbers in the square brackets are the rang开发者_Python百科es possible for each respective member of the structure. So why is there 0~61 possible range for seconds? Were there 62 seconds in each minute and I'm the only one who didn't know about it???

int    tm_sec   seconds [0,61] // <-- this part is weird
int    tm_min   minutes [0,59]
int    tm_hour  hour [0,23]
int    tm_mday  day of month [1,31]
int    tm_mon   month of year [0,11]
int    tm_year  years since 1900
int    tm_wday  day of week [0,6] (Sunday = 0)
int    tm_yday  day of year [0,365]
int    tm_isdst daylight savings flag


Leap seconds.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号