[nodejs] Re: Server Timestamp

2013-04-05 Thread Tolgay Toklar
Thanks for answers. But there is a problem: Php time() function returns 10 digit number.Javascript Date.now() function returns 13 digit number.How can I resolve this problem ? I can't do process on numbers. 5 Nisan 2013 Cuma 18:56:49 UTC+3 tarihinde Tolgay Toklar yazdı: Hi How can I get

Re: [nodejs] Re: Server Timestamp

2013-04-05 Thread Dan Milon
Read the documentation. Date.now(), Date#getTime(), etc return the number of milliseconds since epoch. Whereas php's time() returns seconds. Hence the 3 digit difference. Math.round(Date.now() / 1000) That converts from ms to s. On 05/04/2013 09:56 μμ, Tolgay Toklar wrote: Thanks for

Re: [nodejs] Re: Server Timestamp

2013-04-05 Thread Arnout Kazemier
nonono, you heard him he can't process on the numbers. On Friday, April 5, 2013 at 9:02 PM, Dan Milon wrote: Math.round(Date.now() / 1000) -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this

[nodejs] Re: Server Timestamp

2013-04-05 Thread Tolgay Toklar
Thank you so much to everybody :) Math.round(Date.now() / 1000) This code resolved my problem. 5 Nisan 2013 Cuma 18:56:49 UTC+3 tarihinde Tolgay Toklar yazdı: Hi How can I get server timestamp in nodejs ? (Like a php time() function) -- -- Job Board: http://jobs.nodejs.org/ Posting