]> git.sur5r.net Git - openldap/blobdiff - clients/ud/print.c
Round one of LDAP_F() macro changes. In this round we rename
[openldap] / clients / ud / print.c
index 1b3a50de7be96553b6bfb9e1843f6525f43a394e..914b3e3d1be204eb6281011bc5265b93a57a8627 100644 (file)
@@ -1,6 +1,6 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /*
@@ -56,6 +56,8 @@ static char *person_attr_print_order[] = {
        "memberOfGroup",
        "lastModifiedBy",
        "lastModifiedTime",
+       "modifiersname",
+       "modifytimestamp",
        NULL
 };
 
@@ -78,6 +80,10 @@ static char *group_attr_print_order[] = {
        "labeledURL",
        "lastModifiedBy",
        "lastModifiedTime",
+       "modifiersname",
+       "modifytimestamp",
+       "creatorsname",
+       "createtimestamp",
        NULL
 };
 
@@ -569,7 +575,7 @@ time2text( char *ldtimestr, int dateonly )
            return( fmterr );
        }
        
-    memset( (char *)&t, 0, sizeof( struct tm ));
+    memset( (char *)&t, '\0', sizeof( struct tm ));
 
     p = ldtimestr;
 
@@ -578,8 +584,10 @@ time2text( char *ldtimestr, int dateonly )
                /* POSIX says tm_year should be year - 1900 */
        t.tm_year = 100 * GET2BYTENUM( p ) - 1900;
                p += 2;
+       } else {
+       t.tm_year = 0;
        }
-    t.tm_year = GET2BYTENUM( p ); p += 2;
+    t.tm_year += GET2BYTENUM( p ); p += 2;
 
     t.tm_mon = GET2BYTENUM( p ) - 1; p += 2;
     t.tm_mday = GET2BYTENUM( p ); p += 2;