Skip to content

Instantly share code, notes, and snippets.

@sadsfae
Created March 5, 2021 20:38
Show Gist options
  • Save sadsfae/4b5848ce766cde737e329645b7ba6347 to your computer and use it in GitHub Desktop.
Save sadsfae/4b5848ce766cde737e329645b7ba6347 to your computer and use it in GitHub Desktop.
figure out timezone difference to PST, edit YOUR_DELTA appropriately.
#!/usr/bin/env python3
"""
check the timezone difference to PST
"""
from datetime import datetime, timedelta
YOUR_DELTA = "8"
D = datetime.today() - timedelta(hours=int(YOUR_DELTA), minutes=00)
D.strftime('%H:%M %p')
print(D)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment