Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

302
Views
How to convert Date and Time from GMT to IST in Node JS?

I have

str mydate = 'Tue, 08 Feb 2022 09:17:16 GMT '

and I want to convert it to IST in a fomat like this:

str date = 'Tue, 08 Feb 2022 12:18:16 IST'

How can I do that? in node js?

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

try this

var istDate = new Date('Tue, 08 Feb 2022 09:17:16 GMT').toLocaleString(undefined, {timeZone: 'Asia/Kolkata'});
about 4 years ago · Juan Pablo Isaza Report

0

Try this one:

function changeTimezone() {

           let date = new Date(Date.UTC(2022, 02, 23, 3, 0, 0));
           console.log('Given IST datetime: ' + date);
           let intlDateObj = new Intl.DateTimeFormat('en-US', {
               timeZone: "America/New_York"
           });
         
           let usaTime = intlDateObj.format(date);
           console.log('USA date: ' + usaTime);
       }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!