Difference between revisions of "$ctime"

From Scriptwiki
Jump to: navigation, search
 
(Testing to see if the announcement feature still works.)
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Returns total number of seconds elapsed since 00:00:00 GMT, January 1, 1970 based on your system time or on the time you have spezified.
+
Returns total number of seconds elapsed since 00:00:00 GMT, January 1, 1970 based on your system time or on the time you have specified.
 
  $ctime
 
  $ctime
 
  $ctime(text)
 
  $ctime(text)
Line 6: Line 6:
 
  $ctime(24/12/2004 12:00)
 
  $ctime(24/12/2004 12:00)
 
This will return 1103886000, as it is total number of seconds from January 1, 1970, 00:00 until December 24, 2004, 12:00.
 
This will return 1103886000, as it is total number of seconds from January 1, 1970, 00:00 until December 24, 2004, 12:00.
 +
[[if]] ($ctime > $ctime(25th December 2005)) { [[echo]] -ag Its past christmas 2005 :< }
 +
This will check to see if it's after the 25th of December 2005
  
 
== See Also ==
 
== See Also ==
[[$asctime]] returns the time and date in text format associated with the $ctime time value.
+
* [[$asctime]] returns the time and date in text format associated with the $ctime time value.
  
 
[[Category:Time and Date Identifiers]]
 
[[Category:Time and Date Identifiers]]

Latest revision as of 21:28, 21 June 2013

Returns total number of seconds elapsed since 00:00:00 GMT, January 1, 1970 based on your system time or on the time you have specified.

$ctime
$ctime(text)

$ctime without properties is equivalent to $ctime(January 1 1970 00:00:00).

Example

$ctime(24/12/2004 12:00)

This will return 1103886000, as it is total number of seconds from January 1, 1970, 00:00 until December 24, 2004, 12:00.

if ($ctime > $ctime(25th December 2005)) { echo -ag Its past christmas 2005 :< }

This will check to see if it's after the 25th of December 2005

See Also

  • $asctime returns the time and date in text format associated with the $ctime time value.