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

import localtime -> gmtime change from -devel

parent 62a5807b
No related branches found
No related tags found
No related merge requests found
...@@ -186,10 +186,11 @@ add_created_attrs( Operation *op, Entry *e ) ...@@ -186,10 +186,11 @@ add_created_attrs( Operation *op, Entry *e )
attr_merge( e, "creatorsname", bvals ); attr_merge( e, "creatorsname", bvals );
pthread_mutex_lock( &currenttime_mutex ); pthread_mutex_lock( &currenttime_mutex );
ltm = localtime( &currenttime ); #ifndef LDAP_LOCALTIME
#ifdef LDAP_Y2K ltm = gmtime( &currenttime );
strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm ); strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
#else #else
ltm = localtime( &currenttime );
strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
#endif #endif
pthread_mutex_unlock( &currenttime_mutex ); pthread_mutex_unlock( &currenttime_mutex );
......
...@@ -253,10 +253,11 @@ add_lastmods( Operation *op, LDAPMod **mods ) ...@@ -253,10 +253,11 @@ add_lastmods( Operation *op, LDAPMod **mods )
*mods = tmp; *mods = tmp;
pthread_mutex_lock( &currenttime_mutex ); pthread_mutex_lock( &currenttime_mutex );
ltm = localtime( &currenttime ); #ifndef LDAP_LOCALTIME
#ifdef LDAP_Y2K ltm = gmtime( &currenttime );
strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm ); strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
#else #else
ltm = localtime( &currenttime );
strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
#endif #endif
pthread_mutex_unlock( &currenttime_mutex ); pthread_mutex_unlock( &currenttime_mutex );
......
...@@ -95,10 +95,11 @@ monitor_info( Connection *conn, Operation *op ) ...@@ -95,10 +95,11 @@ monitor_info( Connection *conn, Operation *op )
nreadwaiters++; nreadwaiters++;
} }
pthread_mutex_lock( &currenttime_mutex ); pthread_mutex_lock( &currenttime_mutex );
ltm = localtime( &c[i].c_starttime ); #ifndef LDAP_LOCALTIME
#ifdef LDAP_Y2K ltm = gmtime( &c[i].c_starttime );
strftime( buf2, sizeof(buf2), "%Y%m%d%H%M%SZ", ltm ); strftime( buf2, sizeof(buf2), "%Y%m%d%H%M%SZ", ltm );
#else #else
ltm = localtime( &c[i].c_starttime );
strftime( buf2, sizeof(buf2), "%y%m%d%H%M%SZ", ltm ); strftime( buf2, sizeof(buf2), "%y%m%d%H%M%SZ", ltm );
#endif #endif
pthread_mutex_unlock( &currenttime_mutex ); pthread_mutex_unlock( &currenttime_mutex );
...@@ -163,10 +164,11 @@ monitor_info( Connection *conn, Operation *op ) ...@@ -163,10 +164,11 @@ monitor_info( Connection *conn, Operation *op )
attr_merge( e, "bytessent", vals ); attr_merge( e, "bytessent", vals );
pthread_mutex_lock( &currenttime_mutex ); pthread_mutex_lock( &currenttime_mutex );
ltm = localtime( &currenttime ); #ifndef LDAP_LOCALTIME
#ifdef LDAP_Y2K ltm = gmtime( &currenttime );
strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm ); strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
#else #else
ltm = localtime( &currenttime );
strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
#endif #endif
pthread_mutex_unlock( &currenttime_mutex ); pthread_mutex_unlock( &currenttime_mutex );
...@@ -175,10 +177,11 @@ monitor_info( Connection *conn, Operation *op ) ...@@ -175,10 +177,11 @@ monitor_info( Connection *conn, Operation *op )
attr_merge( e, "currenttime", vals ); attr_merge( e, "currenttime", vals );
pthread_mutex_lock( &currenttime_mutex ); pthread_mutex_lock( &currenttime_mutex );
ltm = localtime( &starttime ); #ifndef LDAP_LOCALTIME
#ifdef LDAP_Y2K ltm = gmtime( &starttime );
strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm ); strftime( buf, sizeof(buf), "%Y%m%d%H%M%SZ", ltm );
#else #else
ltm = localtime( &starttime );
strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm ); strftime( buf, sizeof(buf), "%y%m%d%H%M%SZ", ltm );
#endif #endif
pthread_mutex_unlock( &currenttime_mutex ); 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