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

229
Views
¿Cómo formatear correctamente la fecha con la zona horaria en date-fns?

Estoy usando la biblioteca date-fns pero no está formateando la fecha correctamente.

Mi código:

 import { format } from 'date-fns' console.log(format(endOfDay(new Date()), "yyyy-MM-dd'T'HH:mm:ssX"))

resultado requerido:

 2022-05-19T23:59:59Z

Resultado actual:

 2022-05-19T23:59:59+02

Por favor, ayúdame a encontrar el error. Gracias

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

0

Para obtener el resultado deseado usando el formato...

 import { format } from 'date-fns' console.log(format(new Date(), "yyyy-MM-dd'T'HH:mm:ss'Z'"));
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!