Debian Bug report logs - #729570
strptime: tm_year since 1900

version graph

Package: manpages-dev; Maintainer for manpages-dev is Dr. Tobias Quathamer <toddy@debian.org>; Source for manpages-dev is src:manpages (PTS, buildd, popcon).

Reported by: Mathieu Malaterre <malat@debian.org>

Date: Thu, 14 Nov 2013 13:18:02 UTC

Severity: normal

Tags: confirmed, fixed-upstream, patch, upstream

Found in version manpages/3.54-1

Fixed in version manpages/3.56-1

Done: Simon Paillard <spaillard@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#729570; Package manpages-dev. (Thu, 14 Nov 2013 13:18:06 GMT) (full text, mbox, link).


Acknowledgement sent to Mathieu Malaterre <malat@debian.org>:
New Bug report received and forwarded. Copy sent to Martin Schulze <joey@debian.org>. (Thu, 14 Nov 2013 13:18:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Mathieu Malaterre <malat@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Year since 1900
Date: Thu, 14 Nov 2013 14:14:17 +0100
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_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 */
           };
...

into:

               int tm_year;       /* year since 1900 */



Changed Bug title to 'strptime: tm_year since 1900' from 'Year since 1900' Request was from Simon Paillard <spaillard@debian.org> to control@bugs.debian.org. (Thu, 14 Nov 2013 20:18:04 GMT) (full text, mbox, link).


Marked as found in versions manpages/3.54-1. Request was from Simon Paillard <spaillard@debian.org> to control@bugs.debian.org. (Thu, 14 Nov 2013 20:21:08 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#729570; Package manpages-dev. (Thu, 14 Nov 2013 20:42:04 GMT) (full text, mbox, link).


Acknowledgement sent to Simon Paillard <spaillard@debian.org>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. (Thu, 14 Nov 2013 20:42:04 GMT) (full text, mbox, link).


Message #14 received at 729570@bugs.debian.org (full text, mbox, reply):

From: Simon Paillard <spaillard@debian.org>
To: Mathieu Malaterre <malat@debian.org>, 729570@bugs.debian.org
Subject: Re: Bug#729570: Year since 1900
Date: Thu, 14 Nov 2013 21:40:24 +0100
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]*/



-- 
Simon Paillard



Added tag(s) confirmed. Request was from Simon Paillard <spaillard@debian.org> to 729570-submit@bugs.debian.org. (Thu, 14 Nov 2013 20:42:04 GMT) (full text, mbox, link).


Added tag(s) upstream. Request was from Simon Paillard <spaillard@debian.org> to 729570-submit@bugs.debian.org. (Thu, 14 Nov 2013 20:42:06 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#729570; Package manpages-dev. (Fri, 15 Nov 2013 08:09:04 GMT) (full text, mbox, link).


Acknowledgement sent to Mathieu Malaterre <malat@debian.org>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. (Fri, 15 Nov 2013 08:09:04 GMT) (full text, mbox, link).


Message #23 received at 729570@bugs.debian.org (full text, mbox, reply):

From: Mathieu Malaterre <malat@debian.org>
To: Simon Paillard <spaillard@debian.org>
Cc: 729570@bugs.debian.org
Subject: Re: Bug#729570: Year since 1900
Date: Fri, 15 Nov 2013 09:06:17 +0100
Hi Simon,

On Thu, Nov 14, 2013 at 9:40 PM, Simon Paillard <spaillard@debian.org> 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



Information forwarded to debian-bugs-dist@lists.debian.org, Martin Schulze <joey@debian.org>:
Bug#729570; Package manpages-dev. (Wed, 01 Jan 2014 23:03:07 GMT) (full text, mbox, link).


Acknowledgement sent to "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>:
Extra info received and forwarded to list. Copy sent to Martin Schulze <joey@debian.org>. (Wed, 01 Jan 2014 23:03:07 GMT) (full text, mbox, link).


Message #28 received at 729570@bugs.debian.org (full text, mbox, reply):

From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Simon Paillard <spaillard@debian.org>, 729570@bugs.debian.org, Mathieu Malaterre <malat@debian.org>
Cc: mtk.manpages@gmail.com, debc <control@bugs.debian.org>
Subject: Re: Bug#729570: Year since 1900
Date: Mon, 30 Dec 2013 19:28:34 +1300
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.manpages@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 <malat@debian.org>
    Reported-by: Simon Paillard <spaillard@debian.org>
    Signed-off-by: Michael Kerrisk <mtk.manpages@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/



Added tag(s) fixed-upstream. Request was from "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> to control@bugs.debian.org. (Wed, 01 Jan 2014 23:03:11 GMT) (full text, mbox, link).


Added tag(s) pending. Request was from Simon Paillard <spaillard@debian.org> to control@bugs.debian.org. (Sun, 12 Jan 2014 17:24:10 GMT) (full text, mbox, link).


Reply sent to Simon Paillard <spaillard@debian.org>:
You have taken responsibility. (Fri, 17 Jan 2014 23:06:25 GMT) (full text, mbox, link).


Notification sent to Mathieu Malaterre <malat@debian.org>:
Bug acknowledged by developer. (Fri, 17 Jan 2014 23:06:25 GMT) (full text, mbox, link).


Message #37 received at 729570-close@bugs.debian.org (full text, mbox, reply):

From: Simon Paillard <spaillard@debian.org>
To: 729570-close@bugs.debian.org
Subject: Bug#729570: fixed in manpages 3.56-1
Date: Fri, 17 Jan 2014 23:04:24 +0000
Source: manpages
Source-Version: 3.56-1

We believe that the bug you reported is fixed in the latest version of
manpages, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 729570@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Simon Paillard <spaillard@debian.org> (supplier of updated manpages package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Fri, 17 Jan 2014 23:15:55 +0100
Source: manpages
Binary: manpages manpages-dev
Architecture: source all
Version: 3.56-1
Distribution: unstable
Urgency: medium
Maintainer: Martin Schulze <joey@debian.org>
Changed-By: Simon Paillard <spaillard@debian.org>
Description: 
 manpages   - Manual pages about using a GNU/Linux system
 manpages-dev - Manual pages about using GNU/Linux for development
Closes: 723659 729570 732464
Changes: 
 manpages (3.56-1) unstable; urgency=medium
 .
   * Imported Upstream version 3.56
     . strptime.3: Add number ranges to comments in 'tm' struct (Closes: #729570)
     . strspn.3: Improve description in NAME (Closes: #723659)
     . mcheck.3: typo in compiler flag (Closes: #732464)
     . vdso.7: New page documenting the vDSO mapped into each process by the
       kernel
Checksums-Sha1: 
 0c476de4e80f348c0f61c582657f8b733e28ae3c 1916 manpages_3.56-1.dsc
 d78b85061eea73fc90440a1ad9698c96fe647bcd 1189304 manpages_3.56.orig.tar.xz
 c3d4faf340c3dbb2feffa774e8a71261b94be13b 42304 manpages_3.56-1.debian.tar.xz
 ebc6919ef762f80ce37641d6fdfb2d08e184c72b 872164 manpages_3.56-1_all.deb
 29be41088e2b6e1bc159e6e3b3652f7963bbd18e 1801668 manpages-dev_3.56-1_all.deb
Checksums-Sha256: 
 ae11ae0c81b397900156c2beebd90cb032bdf308de9421c3af60c8833d94e977 1916 manpages_3.56-1.dsc
 a0cbdf5e90e21138d4e5cb0b932d51f34907e4e0d2d200c77b2bababc93828aa 1189304 manpages_3.56.orig.tar.xz
 b788fb21411ef69be75e2e448d8fa75fcb2b508ee3f109c2bfddba0678a51893 42304 manpages_3.56-1.debian.tar.xz
 2cc9ddcb1aba17bec6578055107d0f97813eb7015bd317b4cffa5d589dff3c7a 872164 manpages_3.56-1_all.deb
 7902c92f24050f30aed9134dcd8269768d3af14e96cc083df544ed2f2f9144e1 1801668 manpages-dev_3.56-1_all.deb
Files: 
 14a8f48abd0ac82028994a5b301189be 1916 doc important manpages_3.56-1.dsc
 888e0c96df95e7649cedfcb26d61f22b 1189304 doc important manpages_3.56.orig.tar.xz
 dca697d05cc6da92ab99f6c17754e70b 42304 doc important manpages_3.56-1.debian.tar.xz
 5be989e48be36b782d173e5ed1beaa87 872164 doc important manpages_3.56-1_all.deb
 c05b4af017cd00908379726bef005e58 1801668 doc optional manpages-dev_3.56-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJS2bEFAAoJEN/3OMLRbPuiFQ0QAIs68/5fvvls3pHyIuWbenDI
sJO1KM/0kSco7pfhxkBvj8P4x07vTJSl3Yv90Se/RX9GpGUnbfkrgBVKD4Y1amkQ
7x1XjzQ4Zo0zfhIxrt50c/f4cHDvGQpIrmZgKj6DQD8pRNHX+EFR/bdOt64wNGDI
se+5Pcq98xjvHMncP3tvV/wV+1ppShVipILOX2m2CuYDs0k4CtRSX33cBgaLuYdj
bGZ38zlKMPvlXuPWA0Lhy06j3JXcr+WqyYjdDg1RMbm1jS/ZnfaeFA9IfunI0owa
42h2smdz47G3sMif1pl4TpGXOfhFkpAe45UyBOewIbWfhtUG9oO4Ev9zwoouqheN
afmmw/T1Lpyl6VFUh/qcsxALN16vKoMw2Kt424T8bkwJafEelqFtH7aF4DeoyBKp
uGLdNZ2VK50FCB8nh3imuXgTSwEbpJBdmfEDMsDsEecWRxfox+iWzyo95XNZG3zU
K2NBDXQjJuWA6gWq0C1/vZ1fFTALmz71igldetOjZm94IzfGE1DjmwIotvAYv1z8
BGfQ0WDatQgDBBIK1Zzm0G0A703i4Q/R23hfVBF/6UQr05izFVbz9UxqnnC6XzV+
ecwbDrNWSuCBBXRMt0vMTbmpTdKjn2OdxTVttf5CnjeKKuGpEPLL715faTIm2DHk
HPcSDlmRpPOfmE5mKdmM
=F0Lx
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 20 Feb 2014 07:33:47 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Thu Mar 9 10:02:32 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.