]> git.sur5r.net Git - openldap/commitdiff
Use gmtime() instead of localtime()
authorKurt Zeilenga <kurt@openldap.org>
Wed, 21 Oct 1998 19:26:49 +0000 (19:26 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 21 Oct 1998 19:26:49 +0000 (19:26 +0000)
servers/slapd/add.c
servers/slapd/modify.c
servers/slapd/monitor.c

index 93cc3cdcd3b3c74e7eab51c8c35d54632fc5bb19..ec233cd6a56a012e3dd7b0d3909f4b92578d7f1e 100644 (file)
@@ -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 );
index dd7689cfaf9bc23f031ea5607917c4211d62fe6e..ff6d4dd0470b9851c79544932ad82e0f9636b135 100644 (file)
@@ -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 );
index a7311989ef4fb086ed8541a5d238e74307f941cc..6a3403ea926f561092ce232791d6e5c5ee7e99af 100644 (file)
@@ -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 );