Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
79
rated 0 times [  86] [ 7]  / answers: 1 / hits: 30169  / 11 Years ago, tue, october 8, 2013, 12:00:00

This is what I do in Ruby.



time = Time.now
=> 2013-10-08 12:32:50 +0530
time.to_i //converts time to integer
=> 1381215770
Time.at(time.to_i) //converts integer to time
=> 2013-10-08 12:32:50 +0530


I'm trying to implement the same with Node.js, but not sure how to do it. Kindly help me in finding a module for implementing the same with Node.js, Javascript. Thanks!


More From » node.js

 Answers
2

In javascript world.



Date.now()

and

new Date(1381216317325);

[#75155] Monday, October 7, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
andrewb

Total Points: 259
Total Questions: 124
Total Answers: 90

Location: Ivory Coast
Member since Sun, Mar 7, 2021
3 Years ago
;