]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Update type_decorator example to align with python docs 10719/head
authorKevin Kirsche <kevin.kirsche@one.verizon.com>
Thu, 30 Nov 2023 14:59:11 +0000 (09:59 -0500)
committerGitHub <noreply@github.com>
Thu, 30 Nov 2023 14:59:11 +0000 (09:59 -0500)
commitbb30cb3cfe57f326addec21a6cae5f81184c2e74
treeb53d3633386758eebe761c865904acf871189638
parent82690b1cfc1e76e5deb622a9afefbcf3be299962
Update type_decorator example to align with python docs

This change updates the `TZDateTime` type decorator to use the timezone awareness checks described in the Python documentation located here:

https://docs.python.org/3/library/datetime.html#determining-if-an-object-is-aware-or-naive

The specific lines state:

> A `datetime` object `d` is aware if both of the following hold:
>
>```python
d.tzinfo is not None
d.tzinfo.utcoffset(d) does not return None
```
>
>Otherwise, `d` is naive.
doc/build/core/custom_types.rst