mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 17:49:59 -05:00
Use gmtime() instead of localtime()
This commit is contained in:
parent
4a5d740e2e
commit
68a473e6af
3 changed files with 6 additions and 3 deletions
|
|
@ -184,10 +184,11 @@ add_created_attrs( Operation *op, Entry *e )
|
|||
attr_merge( e, "creatorsname", bvals );
|
||||
|
||||
pthread_mutex_lock( ¤ttime_mutex );
|
||||
ltm = localtime( ¤ttime );
|
||||
#ifdef LDAP_Y2K
|
||||
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 );
|
||||
|
|
|
|||
|
|
@ -251,10 +251,11 @@ add_lastmods( Operation *op, LDAPMod **mods )
|
|||
*mods = tmp;
|
||||
|
||||
pthread_mutex_lock( ¤ttime_mutex );
|
||||
ltm = localtime( ¤ttime );
|
||||
#ifdef LDAP_Y2K
|
||||
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 );
|
||||
|
|
|
|||
|
|
@ -93,10 +93,11 @@ monitor_info( Connection *conn, Operation *op )
|
|||
nreadwaiters++;
|
||||
}
|
||||
pthread_mutex_lock( ¤ttime_mutex );
|
||||
ltm = localtime( &c[i].c_starttime );
|
||||
#ifdef LDAP_Y2K
|
||||
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 );
|
||||
|
|
|
|||
Loading…
Reference in a new issue