]> git.sur5r.net Git - openldap/commitdiff
more localtime -> gmtime changes
authorKurt Zeilenga <kurt@openldap.org>
Wed, 21 Oct 1998 19:29:20 +0000 (19:29 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 21 Oct 1998 19:29:20 +0000 (19:29 +0000)
servers/slapd/monitor.c

index 6a3403ea926f561092ce232791d6e5c5ee7e99af..8667bf2ca4456a92363ed24c414a7a5b2089e523 100644 (file)
@@ -162,10 +162,11 @@ monitor_info( Connection *conn, Operation *op )
        attr_merge( e, "bytessent", vals );
 
        pthread_mutex_lock( &currenttime_mutex );
-       ltm = localtime( &currenttime );
 #ifdef LDAP_Y2K
+       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 );
@@ -174,10 +175,11 @@ monitor_info( Connection *conn, Operation *op )
        attr_merge( e, "currenttime", vals );
 
        pthread_mutex_lock( &currenttime_mutex );
-       ltm = localtime( &starttime );
 #ifdef LDAP_Y2K
+       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 );