Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

145
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda