mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-18 11:05:48 +08:00
import localtime -> gmtime change from -devel
This commit is contained in:
parent
62a5807bb3
commit
e40ec58ab2
@ -186,10 +186,11 @@ add_created_attrs( Operation *op, Entry *e )
|
||||
attr_merge( e, "creatorsname", bvals );
|
||||
|
||||
pthread_mutex_lock( ¤ttime_mutex );
|
||||
ltm = localtime( ¤ttime );
|
||||
#ifdef LDAP_Y2K
|
||||
#ifndef LDAP_LOCALTIME
|
||||
ltm = gmtime( ¤ttime );
|
||||
strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
|
||||
#else
|
||||
ltm = localtime( ¤ttime );
|
||||
strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
|
||||
#endif
|
||||
pthread_mutex_unlock( ¤ttime_mutex );
|
||||
|
@ -253,10 +253,11 @@ add_lastmods( Operation *op, LDAPMod **mods )
|
||||
*mods = tmp;
|
||||
|
||||
pthread_mutex_lock( ¤ttime_mutex );
|
||||
ltm = localtime( ¤ttime );
|
||||
#ifdef LDAP_Y2K
|
||||
#ifndef LDAP_LOCALTIME
|
||||
ltm = gmtime( ¤ttime );
|
||||
strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
|
||||
#else
|
||||
ltm = localtime( ¤ttime );
|
||||
strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
|
||||
#endif
|
||||
pthread_mutex_unlock( ¤ttime_mutex );
|
||||
|
@ -95,10 +95,11 @@ monitor_info( Connection *conn, Operation *op )
|
||||
nreadwaiters++;
|
||||
}
|
||||
pthread_mutex_lock( ¤ttime_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( ¤ttime_mutex );
|
||||
@ -163,10 +164,11 @@ monitor_info( Connection *conn, Operation *op )
|
||||
attr_merge( e, "bytessent", vals );
|
||||
|
||||
pthread_mutex_lock( ¤ttime_mutex );
|
||||
ltm = localtime( ¤ttime );
|
||||
#ifdef LDAP_Y2K
|
||||
#ifndef LDAP_LOCALTIME
|
||||
ltm = gmtime( ¤ttime );
|
||||
strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
|
||||
#else
|
||||
ltm = localtime( ¤ttime );
|
||||
strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
|
||||
#endif
|
||||
pthread_mutex_unlock( ¤ttime_mutex );
|
||||
@ -175,10 +177,11 @@ monitor_info( Connection *conn, Operation *op )
|
||||
attr_merge( e, "currenttime", vals );
|
||||
|
||||
pthread_mutex_lock( ¤ttime_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( ¤ttime_mutex );
|
||||
|
Loading…
Reference in New Issue
Block a user