Created
January 17, 2023 14:16
-
-
Save FounderDAO/8fc33237308e27b2715397ab8161fb53 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from datetime import datetime | |
| def to_isoformat(dt: datetime) -> str: | |
| return ( | |
| dt.isoformat(timespec="milliseconds") | |
| .replace("+00:00", "Z") | |
| .replace(".000Z", "Z") | |
| ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment