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

149
Views
Calculate duration of two dates, first one is utc date, second is browser's local gmt time (London timezone)

I have an issue with the calculation of duration between two dates, one is UTC London time, and the second one is the browser's local time.

first date is 2022-04-20T08:29:55.614 (server's UTC time) second one is 2022-04-20T09:44:16.234 (browser's local time)

I calculate the difference by using the moment:

const differenceDate = moment.duration(currentDate.diff(startupDateTime))

The difference should be 14 minutes, but the result is 1 hour and 14 minutes.

I tried to use the moment-timezone library but the result was almost the same.

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!