make_aware
Set timezone for a :class:~datetime.datetime object.
def make_aware(
dt: datetime,
tz: tzinfo
) - > datetime
Set timezone for a :class:~datetime.datetime object.
Parameters
| Name | Type | Description |
|---|---|---|
| dt | datetime | The naive or aware datetime object to be updated with a specific timezone. |
| tz | tzinfo | The timezone information object to apply to the datetime. |
Returns
| Type | Description |
|---|---|
datetime | The timezone-aware datetime object, adjusted to the earliest possible time if the transition is ambiguous. |