Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing support for microsecond precision in ORM DateTimeField #87

Open
jorisroovers opened this issue May 6, 2015 · 1 comment
Open

Comments

@jorisroovers
Copy link

Micro precision support is disabled in the DatabaseFeatures class in base.py

supports_microsecond_precision = False

See here:

supports_microsecond_precision = False

You can use the following as a workaround (place this e.g. in local_settings.py):

from django_pyodbc.base import DatabaseFeatures
DatabaseFeatures.supports_microsecond_precision = True
@timgraham
Copy link

supports_microsecond_precision = False was added in 39128a7. Does Azure not support microseconds @michiya? MySQL 5.5 is the last database for a built-in database backend that doesn't support microseconds. When that version is dropped, it would be more difficult to maintain correct usage of supports_microsecond_precision in tests since nothing in our CI will be testing the flag (actually we don't test with MySQL 5.5 right now either). Ideally, we could drop the supports_microsecond_precision feature and require third-party backends to write their own logic to handle the lack of microsecond support, if that's still a limitation.

@dlo dlo added the help wanted label Feb 1, 2018
@dlo dlo added the bug label Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants