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
Make returned date reflect city searched and not local browser date

I've created a React weather app that returns various pieces of info when you search by city. One of those pieces of info is the date. My problem is that the date returned reflects the date of the location where the browser is located. For example, if it is "12/20/2021" and I'm in Chicago but it's "12/21/2021" in Shanghai, when I search Shanghai from Chicago it shows the date as "12/20/2021" instead of the date in Shanghai. How can I get my app to reflect the date based upon the city being searched instead of based on where the user is located?

Thanks

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This Stack Overflow question may be of use; in particular this answer provides steps for how to translate your city first into its corresponding time zone, and then fetch the current time and date for that corresponding time zone.

about 4 years ago · Juan Pablo Isaza 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