Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

136
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda