mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
Fix lutil_localtime for EBCDIC
This commit is contained in:
parent
5d0ba372e5
commit
62cc5d2f39
1 changed files with 4 additions and 4 deletions
|
|
@ -81,6 +81,10 @@ size_t lutil_localtime( char *s, size_t smax, const struct tm *tm, long delta )
|
|||
#pragma convlit(suspend)
|
||||
#endif
|
||||
ret = strftime( s, smax, "%Y%m%d%H%M%SZ", tm );
|
||||
#ifdef HAVE_EBCDIC
|
||||
#pragma convlit(resume)
|
||||
__etoa( s );
|
||||
#endif
|
||||
if ( delta == 0 || ret == 0 ) {
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -102,10 +106,6 @@ size_t lutil_localtime( char *s, size_t smax, const struct tm *tm, long delta )
|
|||
snprintf( p, smax - 15, "%02ld%02ld", delta / 3600,
|
||||
( delta % 3600 ) / 60 );
|
||||
|
||||
#ifdef HAVE_EBCDIC
|
||||
#pragma convlit(resume)
|
||||
__etoa( s );
|
||||
#endif
|
||||
return ret + 5;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue