Python Dates and Times in Python Where on Earth do Timezones Make Sense? Timezone Strings

fsafas

fs

timezone.py
import datetime

import pytz

starter = pytz.utc.localize(datetime.datetime(2015, 10, 21, 23, 29))
def to_timezone(bba):

1 Answer

Josh Keenan
Josh Keenan
19,306 Points

Here's my solution:

def to_timezone(pacific):
    starter_c = pytz.timezone(pacific)
    return starter.astimezone(starter_c)