על ידי aaronfessler | מְעוּדכָּן לפני 8 חודשים | Social

8.9 / 10



רמת שירות


חזרה לכל הדיונים

"created_at" value doesn't make sense?

לפני 4 שנים

I asked the good people at 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?

NoahTwine commented לפני 4 שנים

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:

As you continue to work with the API, feel free to reach out to us anytime. We’re at support at—and we’re always happy to help!

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות
דירוג: 5 - הצבעות: 1