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

158
Views
conversión de zona horaria javascript usando momentjs

Tengo una fecha y hora en UTC y una zona horaria. Quiero convertir esta fecha y hora al equivalente de la zona horaria dada, por ejemplo, si la fecha UTC es 2022-01-10T00:00:00.000Z, eso significa 10 de enero a las 00:00 am y cuando convertirlo a la salida equivalente de la zona horaria de Nueva York se debe dar como 2022-01-09T19: 00: 00.000Z, es decir, 9 de enero a las 07:00 p. m. o 19:00 porque tiene -05:00 horas desde UTC. ¿Cómo puedo lograr eso puede alguien ayudar? zona horaria puede ser cualquier zona horaria. Gracias por tu ayuda.

 like let date= '2022-01-10T00:00:00.000Z'; let timezone = 'America/New_York';
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puedes usar moment-timezone así:

 const moment = require('moment-timezone') const date = '2022-01-10T00:00:00.000Z'; const timezone = 'America/New_York'; const convertedDate = moment.utc(date) // create Moment object from date in UTC .tz(timezone) // convert to provided time zone .format('YYYY-MM-DD hh:mm:ss A') // display in format console.log(convertedDate) // 2022-01-09 07:00:00 PM
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!