]> git.sur5r.net Git - openldap/commitdiff
import localtime -> gmtime change from -devel
authorKurt Zeilenga <kurt@openldap.org>
Wed, 21 Oct 1998 21:56:38 +0000 (21:56 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 21 Oct 1998 21:56:38 +0000 (21:56 +0000)
servers/slapd/add.c
servers/slapd/modify.c
servers/slapd/monitor.c

index feecf522b5e4f9730c4696b1efd8edb58f28d054..7d31bc8744aec3e5795ba34e1eab5099bdea59da 100644 (file)
@@ -186,10 +186,11 @@ add_created_attrs( Operation *op, Entry *e )
        attr_merge( e, "creatorsname", bvals );
 
        pthread_mutex_lock( &currenttime_mutex );
-       ltm = localtime( &currenttime );
-#ifdef LDAP_Y2K
+#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
        pthread_mutex_unlock( &currenttime_mutex );
index 8c0351046049f65a382f3eea426cf746c6054610..2820a3ed19d2ccf59c35f9ecaf088c12939d58ed 100644 (file)
@@ -253,10 +253,11 @@ add_lastmods( Operation *op, LDAPMod **mods )
        *mods = tmp;
 
        pthread_mutex_lock( &currenttime_mutex );
-       ltm = localtime( &currenttime );
-#ifdef LDAP_Y2K
+#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
        pthread_mutex_unlock( &currenttime_mutex );
index 66c6494e5c11d3ad172226f8e29b09cd9c94cf71..c43b61ac46bc6b3e77a856d5e82f4b8bf63aadbb 100644 (file)
@@ -95,10 +95,11 @@ monitor_info( Connection *conn, Operation *op )
                                nreadwaiters++;
                        }
                        pthread_mutex_lock( &currenttime_mutex );
-                       ltm = localtime( &c[i].c_starttime );
-#ifdef LDAP_Y2K
+#ifndef LDAP_LOCALTIME
+                       ltm = gmtime( &c[i].c_starttime );
                        strftime( buf2, sizeof(buf2), "%Y%m%d%H%M%SZ", ltm );
 #else
+                       ltm = localtime( &c[i].c_starttime );
                        strftime( buf2, sizeof(buf2), "%y%m%d%H%M%SZ", ltm );
 #endif
                        pthread_mutex_unlock( &currenttime_mutex );
@@ -163,10 +164,11 @@ monitor_info( Connection *conn, Operation *op )
        attr_merge( e, "bytessent", vals );
 
        pthread_mutex_lock( &currenttime_mutex );
-       ltm = localtime( &currenttime );
-#ifdef LDAP_Y2K
+#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
        pthread_mutex_unlock( &currenttime_mutex );
@@ -175,10 +177,11 @@ monitor_info( Connection *conn, Operation *op )
        attr_merge( e, "currenttime", vals );
 
        pthread_mutex_lock( &currenttime_mutex );
-       ltm = localtime( &starttime );
-#ifdef LDAP_Y2K
+#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
        pthread_mutex_unlock( &currenttime_mutex );