static void
add_created_attrs( Operation *op, Entry *e )
{
- char buf[20];
+ char buf[22];
struct berval bv;
struct berval *bvals[2];
Attribute **a, **next;
attr_merge( e, "creatorsname", bvals );
pthread_mutex_lock( ¤ttime_mutex );
- ltm = localtime( ¤ttime );
- strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
+ ltm = localtime( ¤ttime );
+#ifdef LDAP_Y2K
+ strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
+#else
+ strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
+#endif
pthread_mutex_unlock( ¤ttime_mutex );
bv.bv_val = buf;
static void
add_lastmods( Operation *op, LDAPMod **mods )
{
- char buf[20];
+ char buf[22];
struct berval bv;
struct berval *bvals[2];
LDAPMod **m;
*mods = tmp;
pthread_mutex_lock( ¤ttime_mutex );
- ltm = localtime( ¤ttime );
- strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
+ ltm = localtime( ¤ttime );
+#ifdef LDAP_Y2K
+ strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
+#else
+ strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
+#endif
pthread_mutex_unlock( ¤ttime_mutex );
bv.bv_val = buf;
bv.bv_len = strlen( bv.bv_val );
monitor_info( Connection *conn, Operation *op )
{
Entry *e;
- char buf[BUFSIZ], buf2[20];
+ char buf[BUFSIZ], buf2[22];
struct berval val;
struct berval *vals[2];
int i, nconns, nwritewaiters, nreadwaiters;
}
pthread_mutex_lock( ¤ttime_mutex );
ltm = localtime( &c[i].c_starttime );
+#ifdef LDAP_Y2K
+ strftime( buf2, sizeof(buf2), "%Y%m%d%H%M%SZ", ltm );
+#else
strftime( buf2, sizeof(buf2), "%y%m%d%H%M%SZ", ltm );
+#endif
pthread_mutex_unlock( ¤ttime_mutex );
pthread_mutex_lock( &c[i].c_dnmutex );
attr_merge( e, "bytessent", vals );
pthread_mutex_lock( ¤ttime_mutex );
- ltm = localtime( ¤ttime );
- strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
+ ltm = localtime( ¤ttime );
+#ifdef LDAP_Y2K
+ strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
+#else
+ strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
+#endif
pthread_mutex_unlock( ¤ttime_mutex );
val.bv_val = buf;
val.bv_len = strlen( buf );
attr_merge( e, "currenttime", vals );
pthread_mutex_lock( ¤ttime_mutex );
- ltm = localtime( &starttime );
- strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
+ ltm = localtime( &starttime );
+#ifdef LDAP_Y2K
+ strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
+#else
+ strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
+#endif
pthread_mutex_unlock( ¤ttime_mutex );
val.bv_val = buf;
val.bv_len = strlen( buf );