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

145
Visualizações
My localhost Apache2 PHP UTC has a minute delay

I am trying to set the timezone for my Apache PHP server to get the UTC, and it tells everything is ok, but the datetime I get when retrieving dates is wrong.

I have set in the php.ini the date.timezone like this:

date.timezone=UTC

The info shown realated to date:

phpinfo();

enter image description here

But the real UTC datetime is 1 minutes ahead, so for example if i run

echo date('Y-m-d H:i:s');

I get 2020-05-06 23:59:11 and real UTC is 2020-05-07 00:00:11

I need this to be precise because of Google 2FA Authenticator, to match the codes.

Any suggestion will be well received! Thanks

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Most computer clocks are not perfect at keeping time and will naturally drift one way or the other over time. This is why we have NTP to synchronize our clocks with special clocks that are accurate, and NTPd to keep our local clocks in sync.

How to synchronize your system clock is highly dependent on your OS, with several different flavors of NTPd. If you have further questions about how to specifically configure NTP/NTPd for your OS they would be best asked on https://superuser.com/.

over 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