Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

363
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!