php.js : time() function

time() function

The time() function returns current Unix timestamp.

Remarks : The Unix timestamp measures time as a number of seconds since midnight of Greenwich Mean Time on January 1,1970.





Example of php.js time() function:

In the following web document time() function returns the current time as Unix timestamp.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>php.js : time() function example</title>
<script type="text/javascript" src="../../phpjs/date/datetime.min.js"> </script>
<h1 style="color: green">php.js : time() function example</h1>
<h3>Returns the current time as Unix timestamp.</h3>
<hr />
<script type="text/javascript">
//This is done to make the following JavaScript code compatible to XHTML. <![CDATA[

View the example of php.js time() function in the browser

Download phpjs.zip

Previous: php.js : strtotime() function
Next: php.js : empty() function

Follow us on Facebook and Twitter for latest update.