Return a normalized datetime for the current timezone.
(
self,
year: int,
month: int,
day: int,
hour: int = 0,
minute: int = 0,
second: int = 0,
microsecond: int = 0,
)
| 139 | return cast("_DT", dt.astimezone(self)) |
| 140 | |
| 141 | def datetime( |
| 142 | self, |
| 143 | year: int, |
| 144 | month: int, |
| 145 | day: int, |
| 146 | hour: int = 0, |
| 147 | minute: int = 0, |
| 148 | second: int = 0, |
| 149 | microsecond: int = 0, |
| 150 | ) -> _datetime.datetime: |
| 151 | """ |
| 152 | Return a normalized datetime for the current timezone. |
| 153 | """ |
| 154 | return self.convert( |
| 155 | _datetime.datetime( |
| 156 | year, month, day, hour, minute, second, microsecond, fold=1 |
| 157 | ) |
| 158 | ) |
| 159 | |
| 160 | def __repr__(self) -> str: |
| 161 | return f"{self.__class__.__name__}('{self.name}')" |