tags 729570 fixed-upstream thanks On 11/15/13 09:40, Simon Paillard 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. I applied the change below. Cheers, Michael commit fae39e4795e9ea86ea41f25a9c572ee8e747c9ac Author: Michael Kerrisk <mtk.manpa...@gmail.com> Date: Mon Dec 30 19:24:41 2013 +1300 strptime.3: Add number ranges to comments in 'tm' structure See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=729570 Reported-by: Mathieu Malaterre <ma...@debian.org> Reported-by: Simon Paillard <spaill...@debian.org> Signed-off-by: Michael Kerrisk <mtk.manpa...@gmail.com> diff --git a/man3/strptime.3 b/man3/strptime.3 index 1630a76..c9fd7b5 100644 --- a/man3/strptime.3 +++ b/man3/strptime.3 @@ -266,15 +266,15 @@ as follows: .in +4n .nf struct tm { - int tm_sec; /* seconds */ - int tm_min; /* minutes */ - int tm_hour; /* hours */ - 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 */ + int tm_sec; /* Seconds (0-60) */ + int tm_min; /* Minutes (0-59) */ + int tm_hour; /* Hours (0-23) */ + int tm_mday; /* Day of the month (1-31) */ + int tm_mon; /* Month (0-11) */ + int tm_year; /* Year - 1900 */ + int tm_wday; /* Day of the week (0-6, Sunday = 0) */ + int tm_yday; /* Day in the year (0-365, 1 Jan = 0) */ + int tm_isdst; /* Daylight saving time */ }; .fi .in -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org