]> git.sur5r.net Git - openldap/commitdiff
Set modifiersname/timestamp upon creation.
authorKurt Zeilenga <kurt@openldap.org>
Mon, 1 Nov 1999 17:19:01 +0000 (17:19 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 1 Nov 1999 17:19:01 +0000 (17:19 +0000)
Remove LDAP_LOCALTIME support.

servers/slapd/add.c
servers/slapd/modify.c
servers/slapd/monitor.c

index 1516066f58d2f498dc20ca8b9dfc66c2b9a687c6..093072677b17bc12930f847c597af3749465d154 100644 (file)
@@ -247,21 +247,18 @@ add_created_attrs( Operation *op, Entry *e )
                bv.bv_len = strlen( bv.bv_val );
        }
        attr_merge( e, "creatorsname", bvals );
+       attr_merge( e, "modifiersname", bvals );
 
        currenttime = slap_get_time();
        ldap_pvt_thread_mutex_lock( &gmtime_mutex );
-#ifndef LDAP_LOCALTIME
        ltm = gmtime( &currenttime );
        strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
-#else
-       ltm = localtime( &currenttime );
-       strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
-#endif
        ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
 
        bv.bv_val = buf;
        bv.bv_len = strlen( bv.bv_val );
        attr_merge( e, "createtimestamp", bvals );
+       attr_merge( e, "modifytimestamp", bvals );
 
        return LDAP_SUCCESS;
 }
index 6ac98f292d3d7910d0116d1c87e33252338cc4cd..705cab59db2e264474d9ed5322917a5a22800a43 100644 (file)
@@ -288,13 +288,8 @@ add_modified_attrs( Operation *op, LDAPModList **modlist )
 
        currenttime = slap_get_time();
        ldap_pvt_thread_mutex_lock( &gmtime_mutex );
-#ifndef LDAP_LOCALTIME
        ltm = gmtime( &currenttime );
        strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
-#else
-       ltm = localtime( &currenttime );
-       strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
-#endif
        ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
 
        bv.bv_val = buf;
index 506771f3e4912e0b970a3e8e022f1e8c9acbb7b0..935ae28feeb683089363ed97ff53122d6e4943fc 100644 (file)
@@ -105,19 +105,12 @@ monitor_info(
                }
 
                ldap_pvt_thread_mutex_lock( &gmtime_mutex );
-#ifndef LDAP_LOCALTIME
+
                ltm = gmtime( &c->c_starttime );
                strftime( buf2, sizeof(buf2), "%Y%m%d%H%M%SZ", ltm );
 
                ltm = gmtime( &c->c_activitytime );
                strftime( buf3, sizeof(buf2), "%Y%m%d%H%M%SZ", ltm );
-#else
-               ltm = localtime( &c->.c_starttime );
-               strftime( buf2, sizeof(buf2), "%y%m%d%H%M%SZ", ltm );
-
-               ltm = localtime( &c->c_activitytime );
-               strftime( buf3, sizeof(buf2), "%y%m%d%H%M%SZ", ltm );
-#endif
 
                ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
 
@@ -232,24 +225,14 @@ monitor_info(
        currenttime = slap_get_time();
 
        ldap_pvt_thread_mutex_lock( &gmtime_mutex );
-#ifndef LDAP_LOCALTIME
        ltm = gmtime( &currenttime );
        strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
-#else
-       ltm = localtime( &currenttime );
-       strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
-#endif
        val.bv_val = buf;
        val.bv_len = strlen( buf );
        attr_merge( e, "currenttime", vals );
 
-#ifndef LDAP_LOCALTIME
        ltm = gmtime( &starttime );
        strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
-#else
-       ltm = localtime( &starttime );
-       strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
-#endif
        ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
 
        val.bv_val = buf;