Commit 34e5f91c authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Add support for GeneralizedTime

Add creator/modifiers attrittributes.
parent 2fd0d597
......@@ -65,5 +65,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 }
};
......@@ -51,6 +51,8 @@ static char *person_attr_print_order[] = {
"memberOfGroup",
"lastModifiedBy",
"lastModifiedTime",
"modifiersname",
"modifytimestamp",
NULL
};
......@@ -73,6 +75,10 @@ static char *group_attr_print_order[] = {
"labeledURL",
"lastModifiedBy",
"lastModifiedTime",
"modifiersname",
"modifytimestamp",
"creatorsname",
"createtimestamp",
NULL
};
......@@ -563,8 +569,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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment