user7496931
user7496931

Reputation:

decoding Groupme API 'created_at' object?

I'm messing with CURL and GroupMe's API. I'm trying to figure out when a certain chat was created and I'm getting a 'created_at' object that has a string of numbers:

1434766147

Not exactly sure how to read it. There's no documentation on it. Any help would be appreciated it!

Upvotes: 1

Views: 577

Answers (1)

Renato Gama
Renato Gama

Reputation: 16579

It seems you have a timestamp in unix time format. You should do this const createdAt = new Date(1434766147 * 1000) to get an actual JavaScript date object

Upvotes: 2

Related Questions