Loading django/db/backends/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -442,7 +442,7 @@ class BaseDatabaseWrapper(object): class BaseDatabaseFeatures(object): allows_group_by_pk = False # True if django.db.backend.utils.typecast_timestamp is used on values # True if django.db.backends.utils.typecast_timestamp is used on values # returned from dates() calls. needs_datetime_string_cast = True empty_fetchmany_value = [] Loading tests/timezones/tests.py +2 −2 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ class LegacyDatabaseTests(TestCase): Event.objects.create(dt=dt) event = Event.objects.get() self.assertIsNone(event.dt.tzinfo) # django.db.backend.utils.typecast_dt will just drop the # django.db.backends.utils.typecast_dt will just drop the # timezone, so a round-trip in the database alters the data (!) # interpret the naive datetime in local time and you get a wrong value self.assertNotEqual(event.dt.replace(tzinfo=EAT), dt) Loading @@ -139,7 +139,7 @@ class LegacyDatabaseTests(TestCase): Event.objects.create(dt=dt) event = Event.objects.get() self.assertIsNone(event.dt.tzinfo) # django.db.backend.utils.typecast_dt will just drop the # django.db.backends.utils.typecast_dt will just drop the # timezone, so a round-trip in the database alters the data (!) # interpret the naive datetime in local time and you get a wrong value self.assertNotEqual(event.dt.replace(tzinfo=EAT), dt) Loading Loading
django/db/backends/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -442,7 +442,7 @@ class BaseDatabaseWrapper(object): class BaseDatabaseFeatures(object): allows_group_by_pk = False # True if django.db.backend.utils.typecast_timestamp is used on values # True if django.db.backends.utils.typecast_timestamp is used on values # returned from dates() calls. needs_datetime_string_cast = True empty_fetchmany_value = [] Loading
tests/timezones/tests.py +2 −2 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ class LegacyDatabaseTests(TestCase): Event.objects.create(dt=dt) event = Event.objects.get() self.assertIsNone(event.dt.tzinfo) # django.db.backend.utils.typecast_dt will just drop the # django.db.backends.utils.typecast_dt will just drop the # timezone, so a round-trip in the database alters the data (!) # interpret the naive datetime in local time and you get a wrong value self.assertNotEqual(event.dt.replace(tzinfo=EAT), dt) Loading @@ -139,7 +139,7 @@ class LegacyDatabaseTests(TestCase): Event.objects.create(dt=dt) event = Event.objects.get() self.assertIsNone(event.dt.tzinfo) # django.db.backend.utils.typecast_dt will just drop the # django.db.backends.utils.typecast_dt will just drop the # timezone, so a round-trip in the database alters the data (!) # interpret the naive datetime in local time and you get a wrong value self.assertNotEqual(event.dt.replace(tzinfo=EAT), dt) Loading