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

361
Visualizações
ASP.NET Core DateTime Rest API with Javascript converts to UTC instead of java

I have a problem with sending data from my react application with data Sat Oct 30 2021 00:00:00 GMT+0800 (Singapore Standard Time) from javascript function new Date(). When receiving from the my ASP.NET Core Rest Web API application, it converted to {10/29/2021 4:00:00 PM} for reason. I think what received from ASP.NET was a UTC time conversion from the javascript DateTime that send from my react application. Is there a way to not convert the and retain the same data as javascript DateTime when it receives data from my ASP.NET Core application?

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

0

When I sent the time from the front-end page, the time received by the controller was converted. You can use the following methods to convert:

dateTime.ToString("r")

Result:

enter image description here

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