Getting Epoch Time in Javascript
To get epoch time in milliseconds using Javascript:
ko = new Date();
ji = ko.getTime();
document.write(ji);
Which prints something like this:
1141630966899
-ko and ji are my made up variable names.
-Date() and Time() are built in Javascript methods.
-Epoch time is the number of seconds since January 1, 1970... why that date?... why not!
-document.write prints to the browser.
In Javascript, the epoch time you get with getTime() is in milliseconds (i.e. number of seconds multiplied by 1000).
Free Copy and Paste Javascript Code:
<script type="text/javascript">
<!--
ko = new Date();
ji = ko.getTime();
document.write(ji);
-->
</script>
Resources:
Get Formatted Time in Javascript
Formatting Time in Javascript
Setting a Cookie using Javascript
htmlite.com has a nice Time article