+/* $OpenLDAP$ */
+/*
+ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
/*
* Copyright (c) 1991, 1993
* Regents of the University of Michigan. All rights reserved.
"memberOfGroup",
"lastModifiedBy",
"lastModifiedTime",
+ "modifiersname",
+ "modifytimestamp",
NULL
};
"labeledURL",
"lastModifiedBy",
"lastModifiedTime",
+ "modifiersname",
+ "modifytimestamp",
+ "creatorsname",
+ "createtimestamp",
NULL
};
if (debug & D_TRACE)
printf("->print_an_entry()\n");
#endif
+
+ if( Entry.name == NULL ) {
+ printf(" No Entry found.\n");
+ return;
+ }
+
printf(" \"%s\"\n", Entry.name);
/*
struct tm t;
char *p, *timestr, zone, *fmterr = "badly formatted time";
time_t gmttime;
- char timebuf[32];
int ndigits;
if (strlen( ldtimestr ) < 12 ) {
return( fmterr );
}
- memset( (char *)&t, 0, sizeof( struct tm ));
+ memset( (char *)&t, '\0', sizeof( struct tm ));
p = ldtimestr;
/* 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;
/*
* Y2K YEAR
*/
- /* per POSIX tm_year should be offset by 1900 */
+ /* per STDC & POSIX tm_year *should* be offset by 1900 */
#define YEAR_POSIX(y) ((y) + 1900)
/*
*/
#define YEAR_CAREFUL(y) ((y) < 1900 ? (y) + 1900 : (y))
- /*
- ** if year is < 1990 and < 70 must be offset by 2000 as Unix epoch
- ** started in 1970. if year is < 1990 but >= 70, offset by 1900.
- ** if year is >= 1900, it must be the real year.
- */
-#define YEAR_PEDANTIC(y) ((y) < 1900 \
- ? ((y) < 70 ? (y) + 2000 ? (y) + 1900) \
- : (y))
-
#define YEAR(y) YEAR_CAREFUL(y)