convert local datetime to utc python code example
Example: python datetime to utc
from datetime import timezone
timestamp = dt.replace(tzinfo=timezone.utc).timestamp()
from datetime import timezone
timestamp = dt.replace(tzinfo=timezone.utc).timestamp()