Subject: strftime(%Z)
To: None <tech-userlevel@NetBSD.ORG>
From: Johan Danielsson <joda@pdc.kth.se>
List: tech-userlevel
Date: 03/21/1998 04:11:51
What should the following program output (given that your `normal'
timezone isn't GMT):

#include <stdio.h>
#include <time.h>
main()
{
    char buf[17];
    time_t t = time(NULL);
    strftime(buf, sizeof(buf), "%Z", gmtime(&t));
    printf("%s\n", buf);
}

I think it should output `GMT', but it does output my local
timezone. This seems to be consistent with most other systems I've
tried, but I consider it a bug. Is this supposed to be bug compatible
with something?

/Johan