Ns fmttime

From AOLserver Wiki
Revision as of 19:43, 7 February 2009 by Gustafn (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Man page: http://aolserver.com/docs/tcl/ns_fmttime.html


NAME

ns_fmttime - Convert seconds to a human-readable format using templates

SYNOPSIS

ns_fmttime time ?fmt?

DESCRIPTION

This command produces a string representation of time in seconds since 00:00:00 UTC Jan 1, 1970.
ns_fmttime uses the strftime() system call, so valid fmt strings will vary from platform to platform. Consult your operating system's documentation for strftime() to see what valid fmt strings can contain. fmt defaults to "%c" which is supposed to be the preferred date and time representation for the current locale, which on some platforms should be "%a %b %e %H:%M:%S %Z %Y".

EXAMPLES

   % ns_fmttime 0
   Wed Dec 31 19:00:00 1969
   % ns_fmttime 0 "%a %b %e %H:%M:%S %Z %Y"
   Wed Dec 31 19:00:00 EST 1969
   % ns_fmttime ns_time "%Y%m%d"
   20040614

SEE ALSO

ns_gmtime, ns_httptime, ns_localtime, ns_parsehttptime, ns_parsetime, ns_time

-