Hi Simon,

On Thu, Nov 14, 2013 at 9:40 PM, Simon Paillard <[email protected]> wrote:
> Control: tag -1 +confirmed +upstream
>
> On Thu, Nov 14, 2013 at 02:14:17PM +0100, Mathieu Malaterre wrote:
>> Package: manpages-dev
>> Tags: patch
>>
>> It would be nice if the man page for strptime would be changed from:
>>
>> ...
>>   The broken-down time structure tm is defined in <time.h> as follows:
>>
>>       struct tm {
> [...]
>>           int tm_mday;       /* day of the month */
>>           int tm_mon;        /* month */
>>           int tm_year;       /* year */
>>           int tm_wday;       /* day of the week */
>>           int tm_yday;       /* day in the year */
>>           int tm_isdst;      /* daylight saving time */
>>       };
>> ...
>>
>> into:
>>
>>                int tm_year;       /* year since 1900 */
>
> Thanks for your report.
>
> I think there is a risk of confusion for tm_mon (month) at least.
> We could just copy the struct from the .h and have the range included ?
>
> FTR, time.h says:
>         struct tm
>         {
>           int tm_sec;                   /* Seconds.     [0-60] (1 leap 
> second) */
>           int tm_min;                   /* Minutes.     [0-59] */
>           int tm_hour;                  /* Hours.       [0-23] */
>           int tm_mday;                  /* Day.         [1-31] */
>           int tm_mon;                   /* Month.       [0-11] */
>           int tm_year;                  /* Year - 1900.  */
>           int tm_wday;                  /* Day of week. [0-6] */
>           int tm_yday;                  /* Days in year.[0-365] */
>           int tm_isdst;                 /* DST.         [-1/0/1]*/
>

Thanks much for consideration.

I think the patch is ok, I am just a little nervous about the tm_sec
field, apparently it was [0-61] as per C++98:

http://www.cplusplus.com/reference/ctime/tm/

Other than that, looks much more helpful !

Thx again


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to