diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-10-28 16:53:29 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1996-10-28 16:53:29 +0000 |
commit | c5197623cb3ead1a6731fa541d1a6c610891a3a2 (patch) | |
tree | 5cb4d539e1a9acf3b4fb18b9c8b1d6731c0ed99f /lib/libc/string | |
parent | e02ab2cdd0d2a2d0ca7ef911d4d9fb7184b8270a (diff) |
Deal correctly with time zones
Diffstat (limited to 'lib/libc/string')
-rw-r--r-- | lib/libc/string/strftime.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/string/strftime.c b/lib/libc/string/strftime.c index c1d1e95ffd8..21be6667b40 100644 --- a/lib/libc/string/strftime.c +++ b/lib/libc/string/strftime.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: strftime.c,v 1.6 1996/08/19 08:34:18 tholo Exp $"; +static char *rcsid = "$OpenBSD: strftime.c,v 1.7 1996/10/28 16:53:28 tholo Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/localedef.h> @@ -257,7 +257,8 @@ _fmt(format, t) return(0); continue; case 'Z': - if (t->tm_zone && !_add(t->tm_zone)) + if (tzname[t->tm_isdst ? 1 : 0] && + !_add(tzname[t->tm_isdst ? 1 : 0])) return(0); continue; case '%': |