]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/tmplout.c
LDAP C-API changes
[openldap] / libraries / libldap / tmplout.c
index 372f427f25ea0c6a2a94d04ed25abf1a9a5c2e46..94cc00c1393068c4e0d53eaa4651f06986a28b8c 100644 (file)
@@ -874,6 +874,7 @@ time2text( char *ldtimestr, int dateonly )
     struct tm          t;
     char               *p, *timestr, zone, *fmterr = "badly formatted time";
     time_t             gmttime;
+    char               timebuf[32];
 
     memset( (char *)&t, 0, sizeof( struct tm ));
     if ( (int) strlen( ldtimestr ) < 13 ) {
@@ -899,8 +900,9 @@ time2text( char *ldtimestr, int dateonly )
     }
 
     gmttime = gtime( &t );
-    timestr = ctime( &gmttime );
 
+    timestr = ldap_int_ctime( &gmttime, timebuf );
+   
     timestr[ strlen( timestr ) - 1 ] = zone;   /* replace trailing newline */
     if ( dateonly ) {
        strcpy( timestr + 11, timestr + 20 );