javascriptapigroupme

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!


Solution

  • 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