Skip to content

Instantly share code, notes, and snippets.

@av1v3k
Created November 7, 2025 11:52
Show Gist options
  • Select an option

  • Save av1v3k/a327b92f0c2e9da10c5a7b6430c25484 to your computer and use it in GitHub Desktop.

Select an option

Save av1v3k/a327b92f0c2e9da10c5a7b6430c25484 to your computer and use it in GitHub Desktop.
convert UTC to IST using ES6 method
new Intl.DateTimeFormat('en-US', {
timeZone: 'Asia/Calcutta',
hour: "numeric",
minute: "numeric",
second: "numeric",
}).format(new Date(new Date().toISOString()))
@av1v3k
Copy link
Author

av1v3k commented Nov 7, 2025

toSOString() or to UTCString() whichever method can be used.

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