python utc code example
Example 1: python datetime to utc
from datetime import timezone
timestamp = dt.replace(tzinfo=timezone.utc).timestamp()
Example 2: datetime python timezone
import datetime
import pytz
my_date = datetime.datetime.now(pytz.timezone('US/Pacific'))
Example 3: python datetime from timestamp utc
dt_object = datetime.fromtimestamp(timestamp)