Browse Source

Deal correctly with time zones

OPENBSD_2_1
tholo 28 years ago
parent
commit
32165733ef
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/lib/libc/string/strftime.c

+ 3
- 2
src/lib/libc/string/strftime.c View File

@ -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 '%':


Loading…
Cancel
Save