bin/63064: strptime fails on %z

Makoto Matsushita matusita at jp.FreeBSD.org
Thu Feb 19 10:30:24 PST 2004


The following reply was made to PR bin/63064; it has been noted by GNATS.

From: Makoto Matsushita <matusita at jp.FreeBSD.org>
To: bug-followup at FreeBSD.org
Cc: <sec at 42.org>
Subject: Re: bin/63064: strptime fails on %z
Date: Fri, 20 Feb 2004 03:21:20 +0900

 sec> strptime fails to convert %z
 
 It can be considered that this is not a bug, and "by design".  If
 there's a bug, it is in strptime(3) manual page which says "All
 conversion specifications are identical to those described in
 strftime(3)," apparently that's not true.
 
 From strftime(3) manpage:
 
      The strftime() function conforms to ISO/IEC 9899:1990 (``ISO C89'') with
      a lot of extensions including `%C', `%D', `%E*', `%e', `%G', `%g', `%h',
      `%k', `%l', `%n', `%O*', `%R', `%r', `%s', `%T', `%t', `%u', `%V', `%z',
      `%+'.
 
 Since '%z' format is not defined in th standard, it would be ok that
 strptime(3) doesn't support '%z'.  Of course, it would be even better
 that strptime(3) supports all format characters in strftime(3).
 
 -- -
 Makoto `MAR' Matsushita


More information about the freebsd-bugs mailing list