---
source: crates/ruff_linter/src/rules/flake8_datetimez/mod.rs
---
DTZ005.py:4:1: DTZ005 `datetime.datetime.now()` called without a `tz` argument
  |
3 | # no args
4 | datetime.datetime.now()
  | ^^^^^^^^^^^^^^^^^^^^^^^ DTZ005
5 | 
6 | # wrong keywords
  |
  = help: Pass a `datetime.timezone` object to the `tz` parameter

DTZ005.py:7:1: DTZ005 `datetime.datetime.now()` called without a `tz` argument
  |
6 | # wrong keywords
7 | datetime.datetime.now(bad=datetime.timezone.utc)
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ DTZ005
8 | 
9 | # none args
  |
  = help: Pass a `datetime.timezone` object to the `tz` parameter

DTZ005.py:10:1: DTZ005 `tz=None` passed to `datetime.datetime.now()`
   |
 9 | # none args
10 | datetime.datetime.now(None)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ DTZ005
11 | 
12 | # none keywords
   |
   = help: Pass a `datetime.timezone` object to the `tz` parameter

DTZ005.py:13:1: DTZ005 `tz=None` passed to `datetime.datetime.now()`
   |
12 | # none keywords
13 | datetime.datetime.now(tz=None)
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ DTZ005
14 | 
15 | from datetime import datetime
   |
   = help: Pass a `datetime.timezone` object to the `tz` parameter

DTZ005.py:18:1: DTZ005 `datetime.datetime.now()` called without a `tz` argument
   |
17 | # no args unqualified
18 | datetime.now()
   | ^^^^^^^^^^^^^^ DTZ005
19 | 
20 | # uses `astimezone` method
   |
   = help: Pass a `datetime.timezone` object to the `tz` parameter
