How to convert time in TypeScript? How to convert UTC to IST(UTC+5:30) in TypeScript?
Time Conversion in TypeScript
4 Answers
Know the answer? Post it. Somebody with the same question will find it here.
How to convert time in TypeScript? How to convert UTC to IST(UTC+5:30) in TypeScript?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Md SarfarajRank #194 · 12.4K reputationPosted Apr 9, 2022, 1:03 AM EDT
Dhanush KRank #1,037 · 1.9K reputationPosted Apr 12, 2022, 11:57 AM EDT
You can add time manually using getTime(). which gets time in milliseconds.
curDate=new Date();
futDate=new Date(this.curDate.getTime()+330*60000);
This will add 5 hours 30 minutes to current time.
Dhanush KRank #1,037 · 1.9K reputationPosted Apr 12, 2022, 11:58 AM EDT
Uttam KumarRank #1,076 · 1.8K reputationPosted Apr 8, 2022, 2:26 PM EDT