I asked the good people at twinesocial.com if “created_at” referenced the date the content was posted and how it translates into a normal DateTime format. They said it’s in UTC time for consistency, but it doesn’t look like UTC and I can’t make sense of anything after 14. Help?
הצטרף לדיון - הוסף תגובה למטה:
Hey Molly! Glad to hear you’re using our API to build something amazing! I’ll be happy to help you with any questions along the way.
To in answer your question, “created_at” kicks back the UNIX timestamp (the number of seconds since January 1 1970 00:00:00 UTC). So when you get a created_at value like “1512485752,” that’s literally just the number of seconds since January 1, 1970.
We used UNIX timestamps because you can then easily convert into the browser’s timezone. I recommend the jQuery plugin Timeago for this. It’s super lightweight and very plug-and-play. Check it out here:
http://timeago.yarp.com/
As you continue to work with the API, feel free to reach out to us anytime. We’re at support at twinesocial.com—and we’re always happy to help!