On Sun, Jun 15, 2014 at 06:04:20AM -0700, Howard Chu wrote:
ldap_pvt_gettime() returns structured time. There is no reason to then call
lutil_tm2time() to turn it into seconds, and then call slap_timestamp() which
must turn seconds into structured time again for formatting. Personally I
would just sprintf a timestamp here using the lutil_tm structure.
You mean you'd copy the the struct lutil_tm to a struct tm and call
strftime, or you'd actually duplicate the functionality of strftime
yourself with a raw sprintf? It seems if you have an API function to
generate a timestamp (or one to format a string time), it's cleaner to
actually use them, even if it requires swapping some types around, than
to duplicate their functionality inline yourself. But if that's what you
want I'll work on it.