Site Tools


# $EPIC: time_function.txt,v 1.4 2007/07/10 22:09:59 jnelson Exp $




  • All arguments, if any, are ignored.
  • This function calls your system's time(3) function, which typically returns the number of seconds since the epoch, 1970 Jan 1 00:00:00 GMT.
  • In theory, every unix host should have the same time as every other unix host, but getting everyone to agree on the time is like herding cats.
  • If you need sub-second resolution, use the $utime() function.


You can convert the UTC value into human readable format using either the $stime() function or the $strftime() function. You can also use the UTC value for tracking the elapsed time between two events.


The number of seconds that have elapsed since the epoch.


$time()      might return "850381369"


This function first appeared in ircII.

time_function.txt · Last modified: 2007/07/10 22:09 by

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki