lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 14/05/2013 12:21 AM, Roberto Ierusalimschy wrote:
The C99 standard says 0-60. I do not have access to the C89 standard,
too.  However, [1] has literal copies of several parts of that standard
(those related to the libraries), and it states that the range for
tm_sec is [0, 61] (Section 7.12.1 from ISO 9899:1990).

I have a copy of the C89 standard here (in [1]). The following quote is from page 170. As I read it, footnote 137 is part of the standards text.

struct tm

[...] The semantics of the members and their normal ranges are expressed in the comments.^137

 int tm_sec; /* seconds after the minute -- [0, 61] */


^137 The range [0,61] for tm_sec allows for as many as two leap seconds.



[1] The Annotated ANSI C Standard, American National Standard for Programming Languages -- C. Annotated by Herbert Schildt. ANSI/ISO 9899-1990. Osbourne McGraw-Hill. 1990.