apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Morgan <rmor...@covalent.net>
Subject apr_strftime not portable
Date Wed, 17 Jul 2002 19:15:34 GMT

apr_strftime calls the platform's native strftime, which differs between
platforms (solaris and linux for example).  take the following code:

apr_explode_localtime(&xt, apr_time_now());
apr_strftime(buf, &retcode, sizeof(buf), "%G", &xt);

this will result in buf containing '2002' on linux and '%G' on solaris.
(because solaris strftime does not support %G, but linux does)

any ideas on how we can (or if we should) fix this?  i think due to the
differences between platforms we would probably need to implement our own
strftime.  ideas?

-Ryan

Mime
View raw message