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

186
Views
How to get moment-timezone current configured timezone?

So when we configure a default timezone using moment-timezone we do something like this:

moment.tz.setDefault('America/Sao_Paulo')

I was looking for a way to retrieve that value (America/Sao_Paulo) from the moment.tz object... I wasn't able to find it on their documentation page :/ I was assuming it would be something similar to moment.tz.getCurrent() // America/Sao_Paulo

Btw, this is not the same as moment.tz.guess(), because I don't want the user's local timezone, I want literally what is the timezone configured currently on moment, regardless of the browser's timezone.

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

0

I'm also in a similar boat. There appears to be an undocumented attribute on moment that is set after you guess the timezone.

moment.defaultZone

Haven't found how it can be used with other moment-timezone methods yet.

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!