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

256
Visualizações
is JS command `new Date()` the same across different devices and timezones?

Lets say I have a server running in America and Europe, and I run new Date().getTime() on both machines at the same time, would they both return sameish timestamp?

or could 1 be drastically different?

What affects that return, is it the time configured on the machine executing it?

about 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

getTime returns the number of milliseconds since January 1st 1970, UTC, so it doesn’t depend on the local machine time offset.

about 4 years ago · Santiago Trujillo Relatório

0

Date.getTime() returns the number of milliseconds since the Unix Epoch. Regardless of the time zone configuration of either device, assuming that both devices have synchronized clocks, the values should be essentially identical.

about 4 years ago · Santiago Trujillo Relatório
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