From 3d4122962f193a241769f08b690afea0b276353c Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 17 Jan 2000 17:41:11 +0000 Subject: [PATCH] Add print.c to handle GeneralizedTime. Add creat* modify* attributes --- clients/ud/globals.c | 4 ++++ clients/ud/print.c | 10 +++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/clients/ud/globals.c b/clients/ud/globals.c index 18419682c4..18fd0b82af 100644 --- a/clients/ud/globals.c +++ b/clients/ud/globals.c @@ -69,5 +69,9 @@ struct attribute attrlist[] = { { "drink", "Favorite Beverage", change_field, ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_PERSON_MOD }, { "lastModifiedBy", "Last modified by", 0, ATTR_FLAG_GROUP | ATTR_FLAG_PERSON | ATTR_FLAG_IS_A_DN | ATTR_FLAG_READ }, { "lastModifiedTime", "Last modified at", 0, ATTR_FLAG_GROUP | ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_IS_A_DATE }, + { "modifiersname", "Modifier's Name", 0, ATTR_FLAG_GROUP | ATTR_FLAG_PERSON | ATTR_FLAG_IS_A_DN | ATTR_FLAG_READ }, + { "modifytimestamp", "Modify Timestamp", 0, ATTR_FLAG_GROUP | ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_IS_A_DATE }, + { "creatorsname", "Creator's Name", 0, ATTR_FLAG_GROUP | ATTR_FLAG_PERSON | ATTR_FLAG_IS_A_DN | ATTR_FLAG_READ }, + { "createtimestamp", "Create Timestamp", 0, ATTR_FLAG_GROUP | ATTR_FLAG_PERSON | ATTR_FLAG_READ | ATTR_FLAG_IS_A_DATE }, { NULL, NULL, 0, ATTR_FLAG_NONE } }; diff --git a/clients/ud/print.c b/clients/ud/print.c index 1b3a50de7b..5d4414ee55 100644 --- a/clients/ud/print.c +++ b/clients/ud/print.c @@ -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 }; @@ -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; -- 2.39.5