Difference between revisions of "Ns localtime"

From AOLserver Wiki
Jump to navigation Jump to search
(imported from WiKit id 596)
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Man page: http://aolserver.com/docs/tcl/ns_localtime.html
+
<manpage>ns_localtime</manpage>
 
 
----
 
  
 
'''NAME'''
 
'''NAME'''
Line 13: Line 11:
 
'''DESCRIPTION'''
 
'''DESCRIPTION'''
  
ns_localtime: Returns a Tcl list of the pieces of the current local time. The pieces are
+
: This command returns a nine-element Tcl list representing the current time in the system's current timezone. The structure of the list corresponds to the Unix '''struct tm''' time structure:
    seconds (0-59)
 
    minutes (0-59)
 
    hours (0-23)
 
    dayofmonth (1-31)
 
    monthofyear (0-11)
 
    year (year-1900)*
 
    dayofweek (Sunday=0)
 
    dayofyear (0-365)
 
    1 if Daylight Savings Time is in effect
 
  
: This command returns a nine-element Tcl list representing the current time in the system's current timezone.  The structure of the list corresponds to the Unix '''struct tm''' time structure:
+
:* seconds (0-59)
* seconds (0-59)
+
:* minutes (0-59)
* minutes (0-59)
+
:* hours (0-23)
* hours (0-23)
+
:* dayofmonth (1-31)
* dayofmonth (1-31)
+
:* monthofyear (0-11)
* monthofyear (0-11)
+
:* year (year-1900)
* year (year-1900)
+
:* dayofweek (0-6, Sunday=0)
* dayofweek (0-6, Sunday=0)
+
:* dayofyear (0-365)
* dayofyear (0-365)
+
:* isdst (>0 if Daylight Savings Time is in effect)
* isdst (>0 if Daylight Savings Time is in effect)
 
  
 
'''EXAMPLES'''
 
'''EXAMPLES'''
Line 44: Line 32:
 
: [[ns_fmttime]], [[ns_gmtime]], [[ns_httptime]], [[ns_parsehttptime]], [[ns_parsetime]], [[ns_time]]
 
: [[ns_fmttime]], [[ns_gmtime]], [[ns_httptime]], [[ns_parsehttptime]], [[ns_parsetime]], [[ns_time]]
  
----
+
[[Category:Documentation]] - [[Category:Core Tcl API]]
 
 
[[Category Documentation]] - [[Category Core Tcl API]]
 

Latest revision as of 19:44, 7 February 2009

<manpage>ns_localtime</manpage>

NAME

ns_localtime - Return current time in local timezone

SYNOPSIS

ns_localtime

DESCRIPTION

This command returns a nine-element Tcl list representing the current time in the system's current timezone. The structure of the list corresponds to the Unix struct tm time structure:
  • seconds (0-59)
  • minutes (0-59)
  • hours (0-23)
  • dayofmonth (1-31)
  • monthofyear (0-11)
  • year (year-1900)
  • dayofweek (0-6, Sunday=0)
  • dayofyear (0-365)
  • isdst (>0 if Daylight Savings Time is in effect)

EXAMPLES

   % ns_localtime
   33 33 22 11 5 104 5 162 1

SEE ALSO

ns_fmttime, ns_gmtime, ns_httptime, ns_parsehttptime, ns_parsetime, ns_time -