Reputation: 7941
I'm working with a Dataset which gives me a Time Variable for Objects, just like the created_at. The value tho is :
1398037671
Is this a special kind of encoding Timestamps or am i missing something ?
Upvotes: 1
Views: 76
Reputation: 166
That's a Unix timestamp. That specific timestamp represents 04 / 20 / 14 @ 11:47:51pm UTC
You can find out more about them here: http://www.unixtimestamp.com/index.php and at good old wikipedia here: http://en.wikipedia.org/wiki/Unix_time
In Ruby, you can generate a Unix timestamp with Time.now.to_i
(or obviously any other time if you don't want the timestamp for now).
Upvotes: 1
Reputation: 3726
I guess it is "seconds since the Epoch" timestamp
Time.at(1398037671)
2014-04-21 01:47:51 +0200
http://www.ruby-doc.org/core-2.1.1/Time.html#method-c-at
Upvotes: 3