Ns parsetime

From AOLserver Wiki
Revision as of 13:56, 14 June 2004 by WikiSysop (talk | contribs) (imported from WiKit id 617)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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


NAME

ns_parsetime - Return an element from the time structure list

SYNOPSYS

ns_parsetime option time

DESCRIPTION

This command takes a nine-element Tcl list as time representing the Unix struct tm structure (as would be returned from ns_gmtime or ns_localtime) and based on option, returns an element from the list. The valid options are: sec, min, hour, mday, mon, year, wday, yday, isdst. The options are listed in order of the actual elements in the Tcl list itself.

EXAMPLE

   % set time ns_localtime
   33 33 22 11 5 104 5 162 1
   % expr {1900 + ns_parsetime year $time}
   2004

SEE ALSO

ns_fmttime, ns_gmtime, ns_httptime, ns_localtime, ns_parsehttptime, ns_time

Category Documentation - Category Core Tcl API