]> git.sur5r.net Git - openldap/commitdiff
Use lutil_gentime
authorHoward Chu <hyc@openldap.org>
Sat, 27 Jul 2002 02:10:43 +0000 (02:10 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 27 Jul 2002 02:10:43 +0000 (02:10 +0000)
servers/slapd/back-monitor/conn.c
servers/slapd/back-monitor/time.c
servers/slapd/modify.c

index e1ef09f0df575911d8d8fb9c8ec144ea477c9850..ad7ab23240e57b82b44f23f385c842e8705caad2 100644 (file)
@@ -292,10 +292,10 @@ conn_create(
        ldap_pvt_thread_mutex_lock( &gmtime_mutex );
        
        ltm = gmtime( &c->c_starttime );
-       strftime( buf2, sizeof(buf2), "%Y%m%d%H%M%SZ", ltm );
+       lutil_gentime( buf2, sizeof(buf2), ltm );
                        
        ltm = gmtime( &c->c_activitytime );
-       strftime( buf3, sizeof(buf2), "%Y%m%d%H%M%SZ", ltm );
+       lutil_gentime( buf3, sizeof(buf2), ltm );
                        
        ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
 
index 9d2490ff518b2e2b7753bca544f2c777cb6470b7..34465869e4840bbc6a74a534d50267057146b077 100644 (file)
@@ -95,7 +95,7 @@ monitor_subsys_time_init(
        local_time( tms, -timezone, tmbuf, sizeof( tmbuf ) );
 #else /* !HACK_LOCAL_TIME */
        tms = gmtime( &starttime );
-       strftime( tmbuf, sizeof(tmbuf), "%Y%m%d%H%M%SZ", tms );
+       lutil_gentime( tmbuf, sizeof(tmbuf), tms );
 #endif /* !HACK_LOCAL_TIME */
        ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
        snprintf( buf, sizeof( buf ),
@@ -251,7 +251,7 @@ monitor_subsys_time_update(
                local_time( stm, -timezone, stmbuf, sizeof( stmbuf ) );
 #else /* !HACK_LOCAL_TIME */
                stm = gmtime( &starttime );
-               strftime( stmbuf, sizeof( stmbuf ), "%Y%m%d%H%M%SZ", stm );
+               lutil_gentime( stmbuf, sizeof( stmbuf ), stm );
 #endif /* !HACK_LOCAL_TIME */
        }
 
@@ -262,7 +262,7 @@ monitor_subsys_time_update(
                local_time( ctm, -timezone, ctmbuf, sizeof( ctmbuf ) );
 #else /* !HACK_LOCAL_TIME */
                ctm = gmtime( &currentTime );
-               strftime( ctmbuf, sizeof( ctmbuf ), "%Y%m%d%H%M%SZ", ctm );
+               lutil_gentime( ctmbuf, sizeof( ctmbuf ), ctm );
 #endif /* !HACK_LOCAL_TIME */
        }
        ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
index 391fa3bf4c4c9a00d0d134c8af1df372d58a74ee..026678a9ad129f4d18557898cd8dc1ea6fcc29f0 100644 (file)
@@ -563,7 +563,7 @@ int slap_mods_opattrs(
 
                ldap_pvt_thread_mutex_lock( &gmtime_mutex );
                ltm = gmtime( &now );
-               strftime( timebuf, sizeof(timebuf), "%Y%m%d%H%M%SZ", ltm );
+               lutil_gentime( timebuf, sizeof(timebuf), ltm );
 
                csn.bv_len = lutil_csnstr( csnbuf, sizeof( csnbuf ), 0, 0 );
                ldap_pvt_thread_mutex_unlock( &gmtime_mutex );