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

140
Views
Detecting the user's timezone works fine locally but not when deployed

I'm using Nodejs and serverless with AWS Lambda functions to create a user profile and detect their timezone automatically. The thing is that the two methods I have tried using work fine locally although not really accurately.

import { tz } from 'moment-timezone';

let timezone = Intl && Intl.DateTimeFormat().resolvedOptions().timeZone; // This might be unsupported
if (!timezone || timezone.toLowerCase() === 'utc') {
  timezone = tz.guess();
}

However, when the application is deployed on the Amazon cloud (it is set correctly by professionals and I don't have direct access to it), the timezone I receive from my site is UTC or Africa/Abidjan (+0000) although my timezone is Asia/Jerusalem (+0300). The region of the serverless is set to us-east-1.

Can I know what might be going wrong so I can fix it? Or have some explanation of what is going on so as to have a clear understanding of how things work and thus use the right method?

Thank you

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!