- ltm = localtime( ¤ttime );
- strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
+ pthread_mutex_lock( ¤ttime_mutex );
+ 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 );