Created
November 7, 2025 11:52
-
-
Save av1v3k/a327b92f0c2e9da10c5a7b6430c25484 to your computer and use it in GitHub Desktop.
convert UTC to IST using ES6 method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new Intl.DateTimeFormat('en-US', { | |
| timeZone: 'Asia/Calcutta', | |
| hour: "numeric", | |
| minute: "numeric", | |
| second: "numeric", | |
| }).format(new Date(new Date().toISOString())) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
toSOString() or to UTCString() whichever method can be used.