1
0
mirror of https://github.com/a2-4am/4sports.git synced 2025-04-19 22:41:35 +00:00
4sports/bin/rfc2822_to_touch.py
2025-04-04 10:28:00 -04:00

9 lines
235 B
Python
Executable File

#!/usr/bin/env python3
from email.utils import parsedate_to_datetime
from datetime import UTC
from sys import stdin, stdout
d = parsedate_to_datetime(stdin.readline())
stdout.write(d.astimezone(UTC).strftime("%Y-%m-%dT%H:%M:%SZ\n"))