---
source: crates/ruff_linter/src/rules/flake8_datetimez/mod.rs
snapshot_kind: text
---
DTZ001.py:4:1: DTZ001 `datetime.datetime()` called without a `tzinfo` argument
  |
3 | # no args
4 | datetime.datetime(2000, 1, 1, 0, 0, 0)
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ DTZ001
5 | 
6 | # none args
  |
  = help: Pass a `datetime.timezone` object to the `tzinfo` parameter

DTZ001.py:7:1: DTZ001 `tzinfo=None` passed to `datetime.datetime()`
  |
6 | # none args
7 | datetime.datetime(2000, 1, 1, 0, 0, 0, 0, None)
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ DTZ001
8 | 
9 | # not none arg
  |
  = help: Pass a `datetime.timezone` object to the `tzinfo` parameter

DTZ001.py:13:1: DTZ001 `datetime.datetime()` called without a `tzinfo` argument
   |
12 | # no kwargs
13 | datetime.datetime(2000, 1, 1, fold=1)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ DTZ001
14 | 
15 | # none kwargs
   |
   = help: Pass a `datetime.timezone` object to the `tzinfo` parameter

DTZ001.py:16:1: DTZ001 `tzinfo=None` passed to `datetime.datetime()`
   |
15 | # none kwargs
16 | datetime.datetime(2000, 1, 1, tzinfo=None)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ DTZ001
17 | 
18 | from datetime import datetime
   |
   = help: Pass a `datetime.timezone` object to the `tzinfo` parameter

DTZ001.py:21:1: DTZ001 `datetime.datetime()` called without a `tzinfo` argument
   |
20 | # no args unqualified
21 | datetime(2000, 1, 1, 0, 0, 0)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ DTZ001
22 | 
23 | # uses `astimezone` method
   |
   = help: Pass a `datetime.timezone` object to the `tzinfo` parameter
