Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Sep 2001 17:50:02 -0700 (PDT)
From:      Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/30321: strftime(3) '%s' format does not work properly
Message-ID:  <200109050050.f850o2N94250@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/30321; it has been noted by GNATS.

From: Garrett Wollman <wollman@khavrinen.lcs.mit.edu>
To: Archie Cobbs <archie@packetdesign.com>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/30321: strftime(3) '%s' format does not work properly
Date: Tue, 4 Sep 2001 20:46:42 -0400 (EDT)

 <<On Tue, 04 Sep 2001 16:42:38 -0700, Archie Cobbs <archie@packetdesign.com> said:
 
 > For example, if you use '%z' you get the time zone offset read
 > directly from the struct tm; the system time zone has no effect on
 > that conversion whatsoever.
 
 This is a bug.  POSIX says that ``Local timezone information is used
 as though strftime( ) called tzset( ).''  POSIX does not appear to
 permit the implementation to require initialization of non-standard
 fields in `struct tm' for strftime() to work.  I would interpret the
 specification as requiring that strftime() always use the ``system''
 timezone.  In order for our implementation to meet the specification,
 we need to call mktime() on a copy of the input structure in order to
 determine the timezone to generate for `%z' and `%Z'.
 
 -GAWollman
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200109050050.f850o2N94250>