Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muhammadghazali/5bd153d1ae62cbc0389a4df043b09aa0 to your computer and use it in GitHub Desktop.
Save muhammadghazali/5bd153d1ae62cbc0389a4df043b09aa0 to your computer and use it in GitHub Desktop.
Converting the Stripe epoch timestamp to ISO 8601
export function secondsToISOString(seconds) {
const date = new Date(seconds * 1000);
return date.toISOString();
}
export function secondsToISOString(seconds) {
return date.toISOString();
}
Copy link

ghost commented May 6, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment