Skip to content
Snippets Groups Projects
Commit 68a473e6 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Use gmtime() instead of localtime()

parent 4a5d740e
No related branches found
No related tags found
No related merge requests found
......@@ -184,10 +184,11 @@ add_created_attrs( Operation *op, Entry *e )
attr_merge( e, "creatorsname", bvals );
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 );
......
......@@ -251,10 +251,11 @@ add_lastmods( Operation *op, LDAPMod **mods )
*mods = tmp;
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 );
......
......@@ -93,10 +93,11 @@ monitor_info( Connection *conn, Operation *op )
nreadwaiters++;
}
pthread_mutex_lock( &currenttime_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( &currenttime_mutex );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment