fgouget at free.fr
Mon Apr 23 13:22:12 CDT 2001
On Mon, 23 Apr 2001, Michael Mauch wrote:
> Francois Gouget <fgouget at free.fr> wrote:
> The ctime manpage here is from 1996 (glibc-2.0.7 I guess), it came with
> the distribution. I don't see any glibc-2.1.3 or glibc-2.2 manpages,
> only texinfo/info files. Maybe they don't maintain man pages anymore.
> The localtime info from glibc-2.2 says:
> | - Function: struct tm * localtime (const time_t *TIME)
> | The `localtime' function converts the simple time pointed to by
> | TIME to broken-down time representation, expressed relative to the
> | user's specified time zone.
> | The return value is a pointer to a static broken-down time
> | structure, which might be overwritten by subsequent calls to
> | `ctime', `gmtime', or `localtime'. (But no other library function
> | overwrites the contents of this object.)
> | The return value is the null pointer if TIME cannot be represented
> | as a broken-down time; typically this is because the year cannot
> | fit into an `int'.
> | Calling `localtime' has one other effect: it sets the variable
> | `tzname' with information about the current time zone. *Note Time
> | Zone Functions::.
> | Using the `localtime' function is a big problem in multi-threaded
> | programs. The result is returned in a static buffer and this is used in
> | all threads. POSIX.1c introduced a variant of this function.
> And then follows the description for localtime_r().
Ah, well, that's much better. It great even. So it's not glibc's
And, wonder of wonders, I even have it on my system. It's provided by
glibc-doc in 'file:/usr/share/doc/glibc-doc/html/chapters_20.html'. But
of course!!! That's such an obvious place to look at. Who would be so
naive as to type 'man localtime'!
Of course you won't find it if you go to the index page because it's
all screwed up. The best way is to 'grep -l localtime
/usr/share/doc/glibc-doc/html/*.html'. And it's wonderfully inconsistent
with the man pages provided by the manpages-dev package. But I'm sure
this will be fixed in 3-4 years time.
I love Debian.
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
War doesn't determine who's right. War determines who's left.
More information about the wine-devel