File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
1919 has_select_for_update = True
2020 has_select_for_update_nowait = True
2121 has_select_for_update_skip_locked = True
22- has_zoneinfo_database = False
2322 ignores_table_name_case = True
2423 ignores_quoted_identifier_case = True
2524 requires_literal_defaults = True
@@ -56,3 +55,9 @@ def supports_partial_indexes(self):
5655 @cached_property
5756 def supports_functions_in_partial_indexes (self ):
5857 return self .connection .sql_server_version > 2005
58+
59+ @cached_property
60+ def has_zoneinfo_database (self ):
61+ with self .connection .cursor () as cursor :
62+ cursor .execute ("SELECT TOP 1 1 FROM sys.time_zone_info" )
63+ return cursor .fetchone () is not None
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def _get_utcoffset(self, tzname):
3434 # no way to take DST into account at this point
3535 now = datetime .datetime .now ()
3636 delta = zone .localize (now , is_dst = False ).utcoffset ()
37- return delta .days * 86400 + delta .seconds
37+ return delta .days * 86400 + delta .seconds - zone . dst ( now ). seconds
3838
3939 def bulk_batch_size (self , fields , objs ):
4040 """
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ git fetch --depth=1 origin +refs/tags/*:refs/tags/*
1212git checkout $DJANGO_VERSION
1313pip install -r tests/requirements/py3.txt
1414
15- python tests/runtests.py --settings=testapp.settings --noinput --keepdb \
15+ python tests/runtests.py --settings=testapp.settings --noinput \
1616 aggregation \
1717 aggregation_regress \
1818 annotations \
Original file line number Diff line number Diff line change @@ -9,8 +9,7 @@ whitelist_externals =
99 /bin/bash
1010
1111commands =
12- python manage.py test --keepdb
13- python manage.py install_regex_clr test_default
12+ python manage.py test
1413 bash test.sh
1514
1615deps =
You can’t perform that action at this time.
0 commit comments