[phobos] User define datetime format

Jose Armando Garcia jsancio at gmail.com
Mon Jun 6 19:36:08 PDT 2011


On Mon, Jun 6, 2011 at 9:35 PM, Jonathan M Davis <jmdavisProg at gmx.com> wrote:
> The first issue is a matter of API - in particular the format string. What
> does it accept? I have yet to look into the proper way to do that. If there's
> a standard set of escape sequences for date-time strings, then that that's
> what we should go with. But if there isn't, then I/we need to figure out what
> the best solution is. It may be that following what strftime does would be the
> way to go, but I don't know.

If you need some data points...

apache's mod_log_config says the following:

%...{format}t 	The time, in the form given by format, which should be
in strftime(3) format. (potentially localized)

python also seems to use a similar format:

http://docs.python.org/library/datetime.html#strftime-strptime-behavior

so does ruby:

http://www.ruby-doc.org/core/classes/Time.src/M000392.html

and java:

http://download.oracle.com/javase/1.5.0/docs/api/java/util/Formatter.html


std.log doesn't need this ASAP because support for this can be added
later but it would be nice to have.


More information about the phobos mailing list