Subject: Re: strftime(%Z)
To: Todd Vierling <tv@NetBSD.ORG>
From: Johan Danielsson <>
List: tech-userlevel
Date: 03/21/1998 20:04:32
Todd Vierling <tv@NetBSD.ORG> writes:

> This is how the function is described in a couple standards.

Which standards? All I can find is something like `is replaced by the
time zone name or abbreviation, or by no characters if no time zone is
determinable' (this is from ANSI C, Single UNIX says something

> If you really want it to display GMT for this, the procedure is
> simple: putenv("TZ=GMT").

No, this isn't right either. All I want to do is to print a time in
UTC, I don't want the rest of the application to think that the local
time zone is UTC.

This bug makes %Z practically useless. The only OS that does something
sane is Linux (libc5), which outputs nothing when using gmtime().