javascript - Node.js posting date wrong -


i'm posting date elasticsearch , i'n using date.now()

var unixtime = date.now(); 

i'm getting output this: 1373508091156

then use this:

var date = new date(unixtime*1000); 

the output this:

thu sep 27 45494 05:19:16 gmt-0400 (edt) 

i'm not sure why i'm getting wrong date :/

stop multiplying 1,000. problem solved.


Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

mysqli - Php Mysqli_fetch_assoc Error : "Warning: Illegal string offset 'name' in" -

javascript - Chart.js - setting tooltip z-index -