apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: apr_strftime not portable
Date Wed, 17 Jul 2002 19:23:13 GMT
Ryan Morgan wrote:
> 
> 
> 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)
> 

IIRC, '%G' is not ANSI, but an extension on Linux and some others.
Solaris doesn't have it, neither does Darwin. What's the diff between
%G and %Y (year with century)?

-- 
===========================================================================
   Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
      "A society that will trade a little liberty for a little order
             will lose both and deserve neither" - T.Jefferson

Mime
View raw message