Commit 845e0073 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

more localtime -> gmtime changes

parent 68a473e6
...@@ -162,10 +162,11 @@ monitor_info( Connection *conn, Operation *op ) ...@@ -162,10 +162,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 );
#ifdef LDAP_Y2K #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 );
...@@ -174,10 +175,11 @@ monitor_info( Connection *conn, Operation *op ) ...@@ -174,10 +175,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 );
#ifdef LDAP_Y2K #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 );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment