Django Changes Date Request

Hello, I have this Date Object in my front-end "Date Sat May 01 2021 00:00:00 GMT+0800 (Philippine Standard Time)" then when i post request this date object to django server, it changes to "2021-04-30T16:00:00.000Z" which is less day a day. What i am concern about is the day and month, as you can see it subtracted 1 day and it become in the month of April. I need it to stay the day, month, and year for filtering. Thank you!

You have to show how you created your field in the dB and also how you passed the get request to the db please try to reframe your whole question with the goal of getting a good answer

First suggestions
Looking into of django

Those two times are the same. Midnight on May 1, Philippine Standard Time is 4 PM on April 30, UTC. The date hasn’t changed, only its representation.

You need to decide how you’re going to handle the timezone issue within your application. If you’re needing to filter by date, you need to decide if that means “date in your local timezone” or “date in UTC”, and adjust accordingly.

1 Like