Return the current local date and time. :return: Returns an aware datetime object of the current date and time.
()
| 15 | |
| 16 | |
| 17 | def datetime_now() -> datetime.datetime: |
| 18 | """ |
| 19 | Return the current local date and time. |
| 20 | :return: Returns an aware datetime object of the current date |
| 21 | and time. |
| 22 | """ |
| 23 | return datetime.datetime.now(tz=datetime.timezone.utc) |
| 24 | |
| 25 | |
| 26 | def datetime_to_str(dt: datetime.datetime) -> str: |