50👍
✅
As said by the error msg, it expects YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ]
, thus following are valid values:
2012-09-04 06:00
2012-09-04 06:00:00
2012-09-04 06:00:00.000000
# w/ optional TZ as timezone.
2012-09-04 06:00Z # utc
2012-09-04 06:00:00+0800
2012-09-04 06:00:00.000000-08:00
👤okm
3👍
After talking around, what I figured out is that there is no AM/PM input. I had to just check if my dateTimePicker was returning an AM or PM suffix, then call time.split(“:”); to break up hours and minutes, convert the hours to int from a string, then add 12 to it to convert the time to 24 hour time instead of 12 hour time. Theirs probably an easier way to do it, but thats what worked for me.
For example:
2012-09-04 06:00 PM
Needs to be
2012-09-04 18:00
- Docker + Celery tells me not to run as root, but once I don't, I lack permissions to run
- Can I create model in Django without automatic ID?
- Clean Up HTML in Python
- Django vs. Pylons
- Django Admin inline for recursive ManyToMany
- You cannot add messages without installing django.contrib.messages.middleware.MessageMiddleware
- How does Waitress handle concurrent tasks?
- How to I hide my secret_key using virtualenv and Django?
- Django rest framework nested viewsets and routes
- Force delete of any previous test database (autoclobber) when running Django unit tests, eg, in PyCharm
Source:stackexchange.com