Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/lib/libc/time Pull up revision 1.11 (requested by taca):



details:   https://anonhg.NetBSD.org/src/rev/2847f1a33684
branches:  netbsd-1-4
changeset: 470905:2847f1a33684
user:      he <he%NetBSD.org@localhost>
date:      Mon Sep 11 20:13:36 2000 +0000

description:
Pull up revision 1.11 (requested by taca):
  Do not ignore tm_zone field of last parameter, and convert "%Z"
  in format as proper time zone.  Fixes PR#10950.

diffstat:

 lib/libc/time/strftime.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r a248fa227cf1 -r 2847f1a33684 lib/libc/time/strftime.c
--- a/lib/libc/time/strftime.c  Mon Sep 11 20:09:04 2000 +0000
+++ b/lib/libc/time/strftime.c  Mon Sep 11 20:13:36 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: strftime.c,v 1.8 1999/02/07 17:33:30 augustss Exp $    */
+/*     $NetBSD: strftime.c,v 1.8.2.1 2000/09/11 20:13:36 he Exp $      */
 
 /*
  * Copyright (c) 1989 The Regents of the University of California.
@@ -38,11 +38,12 @@
 #if 0
 static char *sccsid = "@(#)strftime.c  5.11 (Berkeley) 2/24/91";
 #else
-__RCSID("$NetBSD: strftime.c,v 1.8 1999/02/07 17:33:30 augustss Exp $");
+__RCSID("$NetBSD: strftime.c,v 1.8.2.1 2000/09/11 20:13:36 he Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
+#include "private.h"
 #include <sys/localedef.h>
 #include <locale.h>
 #include <string.h>
@@ -344,6 +345,12 @@
                                        return (0);
                                continue;
                        case 'Z':
+#ifdef TM_ZONE
+                               if (t->TM_ZONE != NULL) {
+                                       if (!_add(t->TM_ZONE, pt, ptlim))
+                                               return (0);
+                               } else
+#endif /* TM_ZONE */
                                if (tzname[t->tm_isdst ? 1 : 0] &&
                                    !_add(tzname[t->tm_isdst ? 1 : 0], pt,
                                    ptlim))



Home | Main Index | Thread Index | Old Index