Closed hramezani closed 1 year ago
Could you please add a test? Wondering what's the diff between 1401-6-30 00:00
and 1401-6-31 00:00
Could you please add a test?
I already added some tests to prove the fix. Do you have any special test cases in your mind?
Wondering what's the diff between 1401-6-30 00:00 and 1401-6-31 00:00
@slashmili I think the current implementation was wrong. The serializers/serializerfield.JDateTimeField.to_python does not handle string values and it passes the string value to jDateTimeField.parse_date
. parse_data
tries to parse string value by time.strptime
.
time.strptime
parses the date as gregorian datetime. So, 1401-6-31
is not a valid date because June has 30 days.
Thanks!
Fixes https://github.com/slashmili/django-jalali/issues/193