diff options
author | tholo <> | 1996-10-28 16:53:28 +0000 |
---|---|---|
committer | tholo <> | 1996-10-28 16:53:28 +0000 |
commit | 59e0971be42d6d7eeaf345952e19b2be3c2c0b9d (patch) | |
tree | 348b857889e05ae97f5b8cd05975403c840d2f3d /src/lib | |
parent | e8574ee3feaec79fe691fd033f798950d2af40e0 (diff) | |
download | openbsd-59e0971be42d6d7eeaf345952e19b2be3c2c0b9d.tar.gz openbsd-59e0971be42d6d7eeaf345952e19b2be3c2c0b9d.tar.bz2 openbsd-59e0971be42d6d7eeaf345952e19b2be3c2c0b9d.zip |
Deal correctly with time zones
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libc/string/strftime.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libc/string/strftime.c b/src/lib/libc/string/strftime.c index c1d1e95ffd..21be6667b4 100644 --- a/src/lib/libc/string/strftime.c +++ b/src/lib/libc/string/strftime.c | |||
@@ -32,7 +32,7 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | #if defined(LIBC_SCCS) && !defined(lint) | 34 | #if defined(LIBC_SCCS) && !defined(lint) |
35 | static char *rcsid = "$OpenBSD: strftime.c,v 1.6 1996/08/19 08:34:18 tholo Exp $"; | 35 | static char *rcsid = "$OpenBSD: strftime.c,v 1.7 1996/10/28 16:53:28 tholo Exp $"; |
36 | #endif /* LIBC_SCCS and not lint */ | 36 | #endif /* LIBC_SCCS and not lint */ |
37 | 37 | ||
38 | #include <sys/localedef.h> | 38 | #include <sys/localedef.h> |
@@ -257,7 +257,8 @@ _fmt(format, t) | |||
257 | return(0); | 257 | return(0); |
258 | continue; | 258 | continue; |
259 | case 'Z': | 259 | case 'Z': |
260 | if (t->tm_zone && !_add(t->tm_zone)) | 260 | if (tzname[t->tm_isdst ? 1 : 0] && |
261 | !_add(tzname[t->tm_isdst ? 1 : 0])) | ||
261 | return(0); | 262 | return(0); |
262 | continue; | 263 | continue; |
263 | case '%': | 264 | case '%': |