Pregunta

  

Duplicar posibles:
   ¿Por qué tm_sec cubre de 0-60 en lugar de 0-59 en time.h?

Así que cuando miré hacia arriba <time.h> algo de información, me encontré con esto. Estoy asumiendo los números en los corchetes son los rangos posible para cada miembro respectivo de la estructura. Así que ¿por qué hay 0 ~ 61 segundos para el posible rango? Hubo 62 segundos de cada minuto y yo soy el único que no sabía al respecto ???

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
¿Fue útil?
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top