Closed hosseincodes closed 7 months ago
it happens on mysql but not on local host
Could you please share more info like: Django version Python version Django-Jalali version
Are you using the latest version of django-jalali? If not, could you please test the latest version?
Django 5.0.3 Python 3.10.13 django-jalali 6.2.0
Could you please provide more information?
when and where did you get this error?
It would be great to provide a test or sample project helping us to reproduce the problem
The program worked without problems on the local host, but when I deployed it on the host and connected it to the database, I encountered this problem.
In the meantime, I noticed that when I used django-Jalali to record the time, the value was saved like this 2024-04-10 10:59:37.924497+03:30
But in the initial state and without problems, it is saved as follows 1402-12-29T14:41:02.919282+0330
As you can see, there is one more letter T in the initial state. Can this be a problem?
Thanks @hosseincodes for the information.
Unfortunately, I can't reproduce the problem and I can't find the problem.
Let's keep the issue open to find a way to reproduce and fix the probelm
Do you use the same version of MySQL on both local and in your server?
That's interesting, you are saying it was working and suddenly start to happen? What else did change? did you update any dependency ?
BTW I have a memory that we don't support mysql, or maybe I'm wrong that was this #86 which is closed now.
I use sqlite on localhost and mysql on the server. nothing else changed and I have the exact error with the issue you mentioned. yes, it seems like django jalai doesn't support mysql. that would be great to fix this problem
Yup, there is no MySQL support.
I'll close this ticket as a duplicate discussion we have in https://github.com/slashmili/django-jalali/discussions/147
Thanks for giving django-jalali a try and sorry that it wasn't clear from the beginning that it doesn't support MySQL, I'll update the readme to reflect that.
I'd like to suggest a few improvements to your approach to reporting issues. It would be helpful if you could specify the version you are using in future reports. Additionally, it seems there was an important detail omitted in your report: locally you are running SQLite, and on the server, you are running MySQL. Including such details can greatly assist in diagnosing issues more efficiently.
whenever i change my datetime model field from this
created_at = models.DateTimeField(default=now, editable=False)
to thiscreated_at = jmodel.jDateTimeField(auto_now_add=True)
i get this error: (1292, "incorrect datatime value: '2024-04-09 21:58:16.466673+03:30 for column'")