decoding Groupme API 'created_at' object?

524 Views Asked by At

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!

1

There are 1 best solutions below

0
Renato Gama On BEST ANSWER

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