[nodejs] Server Timestamp

2013-04-05 Thread Tolgay Toklar
Hi How can I get server timestamp in nodejs ? (Like a php time() function) -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups nodejs group.

Re: [nodejs] Server Timestamp

2013-04-05 Thread Arnout Kazemier
https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date On Friday 5 April 2013 at 17:56, Tolgay Toklar wrote: Hi How can I get server timestamp in nodejs ? (Like a php time() function) -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] Server Timestamp

2013-04-05 Thread Herman Junge
console.log(new Date()).getTime(); On 4/5/13 12:56 PM, Tolgay Toklar wrote: Hi How can I get server timestamp in nodejs ? (Like a php time() function) -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received

Re: [nodejs] Server Timestamp

2013-04-05 Thread Trygve Lie
var timestamp = +new Date(); Trygve On Fri, 2013-04-05 at 08:56 -0700, Tolgay Toklar wrote: Hi How can I get server timestamp in nodejs ? (Like a php time() function) -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines:

Re: [nodejs] Server Timestamp

2013-04-05 Thread Dan Milon
If all you need is time elapsed since epoch, you dont wanna do that. Nor `+new Date()`. They are way more expensive than a plain `Date.now()`. https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/now On 05/04/2013 07:02 μμ, Herman Junge wrote: console.log(new