Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

195
Vistas
moment.js always returns 0 for minutes()

I am trying to convert a moment into local time. However, when I try to get the minutes value from the moment it returns 0 even though it clearly is not 0 as can be seen from the picture the minutes is actually 35. Likewise, even if I do not try to get the minutes and format it to local time the minutes are again set to 0. In the example below 12:00 PM gets returned. What am I doing wrong and how do I correctly get the minutes portion of the moment or just as good how do I format it to local time with out the minutes being set to 0?

enter image description here

EDIT As suggested in the comments formatting like console.log(m.local().format('hh:mm')) does not have any effect the min are still disregarded. See image.

Also, I'm using version "moment": "^2.29.3"

enter image description here

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda