summaryrefslogtreecommitdiff
path: root/tests/db_functions/datetime/test_extract_trunc.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #34233 -- Dropped support for Python 3.8 and 3.9.Mariusz Felisiak2023-01-181-5/+1
|
* Refs #32365 -- Removed support for pytz timezones per deprecation timeline.Mariusz Felisiak2023-01-171-292/+212
|
* Fixed #33308 -- Added support for psycopg version 3.Daniele Varrazzo2022-12-151-1/+1
| | | | | | | Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews. Co-authored-by: Florian Apolloner <florian@apolloner.eu> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Refs #33990 -- Renamed TransactionTestCase.assertQuerysetEqual() to ↵Gregor Gärtner2022-10-081-61/+61
| | | | | | assertQuerySetEqual(). Co-Authored-By: Michael Howitz <mh@gocept.com>
* Refs CVE-2022-34265 -- Properly escaped Extract() and Trunc() parameters.Simon Charette2022-07-061-5/+9
| | | | Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed CVE-2022-34265 -- Protected Trunc(kind)/Extract(lookup_name) against ↵Mariusz Felisiak2022-07-041-0/+34
| | | | | | SQL injection. Thanks Takuto Yoshikai (Aeye Security Lab) for the report.
* Refs #32365 -- Removed internal uses of utils.timezone.utc alias.Carlton Gibson2022-03-241-5/+4
| | | | | Remaining test case ensures that uses of the alias are mapped canonically by the migration writer.
* Refs #33517 -- Prevented __second lookup from returning fractional seconds ↵nabil-rady2022-02-221-0/+16
| | | | on PostgreSQL.
* Refs #33476 -- Refactored code to strictly match 88 characters line length.Mariusz Felisiak2022-02-071-1/+4
|
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-071-486/+975
|
* Refs #33355 -- Fixed Trunc() with years < 1000 on SQLite.Adam Johnson2021-12-131-4/+14
| | | | | | Thanks to Nick Pope for spotting the bug in Code Review. Co-Authored-By: Nick Pope <nick@nickpope.me.uk>
* Refs #33355 -- Moved Trunc() assertions for invalid arguments and ISO 8601 ↵Mariusz Felisiak2021-12-131-22/+56
| | | | week to separate tests.
* Fixed #33279 -- Fixed handling time zones with "-" sign in names.Can Sarigol2021-11-121-0/+23
| | | | | | Thanks yakimka for the report. Regression in fde9b7d35e4e185903cc14aa587ca870037941b1.
* Fixed #32365 -- Made zoneinfo the default timezone implementation.Carlton Gibson2021-09-161-93/+105
| | | | | Thanks to Adam Johnson, Aymeric Augustin, David Smith, Mariusz Felisiak, Nick Pope, and Paul Ganssle for reviews.
* Refs #32508 -- Raised Type/ValueError instead of using "assert" in ↵Daniyal2021-07-151-1/+2
| | | | | | django.db.models. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Fixed #32750 -- Fixed crash of Extract() transform on OuterRef() expressions.Artur Beltsov2021-05-171-0/+34
| | | | Thanks Simon Charette for the review.
* Fixed #32722 -- Fixed comparing to TruncTime() on Oracle.Mariusz Felisiak2021-05-111-6/+15
|
* Fixed #32699 -- Fixed comparing to TruncTime() with 0 microseconds on MySQL.Alex Hill2021-05-071-0/+16
|
* Fixed #32573 -- Fixed bounds in __iso_year lookup optimization.Florian Demmer2021-03-231-3/+16
|
* Refs #32365 -- Allowed use of non-pytz timezone implementations.Paul Ganssle2021-01-191-179/+204
|
* Fixed #31640 -- Made Trunc() truncate datetimes to Date/TimeField in a ↵David-Wobrock2020-10-141-0/+81
| | | | specific timezone.
* Removed redundant tests in test_extract_trunc.David-Wobrock2020-10-141-32/+0
| | | | | tzinfo is ignored for DateFields and TimeFields, and it's already covered by DateFunctionTests.test_trunc_func().
* Refs #31640 -- Made Extract raise ValueError when using tzinfo with ↵David-Wobrock2020-10-141-0/+12
| | | | Date/TimeField.
* Fixed #31948 -- Added tzinfo parameter to TruncDate() and TruncTime().Joe Jackson2020-09-021-0/+10
|
* Fixed #30821 -- Added ExtractIsoWeekYear database function and iso_week_day ↵Anatol Ulrich2019-10-021-5/+60
| | | | lookup.
* Fixed #30602 -- Made Extract raise ValueError when using unsupported lookups ↵Hasan Ramezani2019-07-121-0/+7
| | | | for DurationField.
* Fixed #30128 -- Fixed handling timedelta timezone in database functions.can2019-06-131-1/+9
|
* Fixed #29396 -- Added indirect values support to __year lookups.Simon Charette2019-05-211-0/+10
| | | | Thanks Windson Yang for the initial patch.
* Fixed #30494 -- Disabled __year lookup optimization for indirect values.Simon Charette2019-05-211-1/+10
| | | | | | | | The previous heuristics were naively enabling the BETWEEN optimization on successful cast of the first rhs SQL params to an integer while it was not appropriate for a lot of database resolved expressions. Thanks Alexey Chernov for the report.
* Fixed #29754 -- Added is_dst parameter to Trunc database functions.ahbk2019-03-071-0/+24
|
* Fixed #29500 -- Fixed SQLite function crashes on null values.Srinivas Reddy Thatiparthy2018-09-101-5/+28
| | | | | Co-authored-by: Srinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com> Co-authored-by: Nick Pope <nick.pope@flightdataservices.com>
* Fixed #28649 -- Added ExtractIsoYear database function and iso_year lookup.Sigurd Ljødal2018-08-181-35/+87
|
* Reorganized datetime db function tests.Nick Pope2018-08-161-0/+1040