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

199
Views
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
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!