Skip to content

Commit 6b62e6d

Browse files
committed
set DatabaseFeatures.supports_microsecond_precision = False
This feature flag has been added to mongodb-forks/django.
1 parent 78fd337 commit 6b62e6d

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

django_mongodb/features.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ class DatabaseFeatures(BaseDatabaseFeatures):
77
supports_ignore_conflicts = False
88
# Not implemented: https://github.com/mongodb-labs/django-mongodb/issues/8
99
supports_json_field = False
10+
# BSON Date type doesn't support microsecond precision.
11+
supports_microsecond_precision = False
1012
# MongoDB stores datetimes in UTC.
1113
supports_timezones = False
1214
# Not implemented: https://github.com/mongodb-labs/django-mongodb/issues/7
@@ -292,15 +294,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
292294
"timezones.tests.NewDatabaseTests.test_cursor_explicit_time_zone",
293295
"timezones.tests.NewDatabaseTests.test_raw_sql",
294296
},
295-
"BSON Date type doesn't support microsecond precision.": {
296-
"basic.tests.ModelRefreshTests.test_refresh_unsaved",
297-
"basic.tests.ModelTest.test_microsecond_precision",
298-
"timezones.tests.LegacyDatabaseTests.test_auto_now_and_auto_now_add",
299-
"timezones.tests.LegacyDatabaseTests.test_aware_datetime_in_local_timezone_with_microsecond",
300-
"timezones.tests.LegacyDatabaseTests.test_naive_datetime_with_microsecond",
301-
"timezones.tests.NewDatabaseTests.test_aware_datetime_in_local_timezone_with_microsecond",
302-
"timezones.tests.NewDatabaseTests.test_naive_datetime_with_microsecond",
303-
},
304297
"Transform not supported.": {
305298
"db_functions.math.test_abs.AbsTests.test_transform",
306299
"db_functions.math.test_acos.ACosTests.test_transform",

0 commit comments

Comments
 (0)