mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-06-12 10:10:03 -04:00
lutil time resolution issue
This commit is contained in:
parent
38c3a3e6ed
commit
3ea58a8163
2 changed files with 12 additions and 8 deletions
1
CHANGES
1
CHANGES
|
|
@ -20,6 +20,7 @@ OpenLDAP 2.3.22 Engineering
|
|||
Fixed slapo-translucent modifications
|
||||
Fixed libldap_r thread debug missing break
|
||||
Fixed libldap_r tpool cleanup
|
||||
Fixed liblutil time resolution issue
|
||||
|
||||
OpenLDAP 2.3.21 Release
|
||||
Fixed libldap referral chasing issue (ITS#4448)
|
||||
|
|
|
|||
|
|
@ -247,14 +247,17 @@ int lutil_parsetime( char *atm, struct lutil_tm *tm )
|
|||
if (tm->tm_sec < 0 || tm->tm_sec > 61) break;
|
||||
|
||||
/* Fractions of seconds */
|
||||
for (i = 0, fracs = 0; isdigit((unsigned char) *ptr); ) {
|
||||
i*=10; i+= *ptr++ - '0';
|
||||
fracs++;
|
||||
}
|
||||
tm->tm_usec = i;
|
||||
if (i) {
|
||||
for (i = fracs; i<6; i++)
|
||||
tm->tm_usec *= 10;
|
||||
if ( *ptr == '.' ) {
|
||||
ptr++;
|
||||
for (i = 0, fracs = 0; isdigit((unsigned char) *ptr); ) {
|
||||
i*=10; i+= *ptr++ - '0';
|
||||
fracs++;
|
||||
}
|
||||
tm->tm_usec = i;
|
||||
if (i) {
|
||||
for (i = fracs; i<6; i++)
|
||||
tm->tm_usec *= 10;
|
||||
}
|
||||
}
|
||||
|
||||
/* Must be UTC */
|
||||
|
|
|
|||
Loading…
Reference in a new issue