#35683: django.utils.timezone.make_naive can underflow for timezones close to
datetime.min
-------------------------------------+-------------------------------------
     Reporter:  Liam DeVoe           |                    Owner:  Shubham
                                     |  Singh Sugara
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  5.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Comment (by Shubham Singh Sugara):

 Replying to [comment:4 Tim Graham]:
 > What behavior do you expect? If the timezone conversion causes the
 datetime to be too small or too big, what can be done?

 For now i can think of this solution
 ** Max case should be also included if  datetime.min is giving error than
 there is a possibility datetime.max also giving the error due to corner
 cases

 We can Update make_naive Function:
  Modify the make_naive function in Django to handle  boundary cases(max
 and min). For instance, if an OverflowError is detected, the function
 could return the closest safe datetime value or handle the error
 gracefully in another way.

 for now i think this can work across all db as changing other parts of
 modules will be db specific
 but if  any other suggestion open to discussion
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35683#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107019175efb182-d5181af1-8e8f-4d4e-b06e-e04aca15b38c-000000%40eu-central-1.amazonses.com.

Reply via email to