Django rest framework is removing "+" from datetimes [duplicate]

I have a simple django get view:

def test_endpoint(request):

The result of this -

<rest_framework.request.Request: GET '/api/test_endpoint?start=1969-12-31T19:00:00+05:00&end=2023-01-16T21:22:52-05:00'>

<QueryDict: {'start': ['1969-12-31T19:00:00 05:00'], 'end': ['2023-01-16T21:22:52-05:00']}>

If you notice start for some reason is cleansing out the + in the datetime. Thus causing an incorrectly formatted datetime object. I have no interest in changing my formatting, but rather fixing why django rest framework is removing the +. You can clearly see in the actual GET request that the + is properly in the string.

Any ideas on how to fix this so start value would be '1969-12-31T19:00:00+05:00' instead of '1969-12-31T19:00:00 05:00' without "fixing" it after the fact? (I want the request.GET object to be correct, I don't want to fix the values after retrieving them from request.GET)

Back to Top