improve date handling

This commit is contained in:
collerek
2021-07-06 15:11:26 +02:00
parent 69fffdd2e2
commit cb4e5ea955
9 changed files with 206 additions and 27 deletions

View File

@ -108,14 +108,18 @@ You can use either `length` and `precision` parameters or `max_digits` and `deci
### Time
`Time()` has no required parameters.
`Time(timezone: bool = False)` has no required parameters.
You can pass `timezone=True` for timezone aware database column.
* Sqlalchemy column: `sqlalchemy.Time`
* Type (used for pydantic): `datetime.time`
### DateTime
`DateTime()` has no required parameters.
`DateTime(timezone: bool = False)` has no required parameters.
You can pass `timezone=True` for timezone aware database column.
* Sqlalchemy column: `sqlalchemy.DateTime`
* Type (used for pydantic): `datetime.datetime`