Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

code challenge: timezone strings

I'm not really sure where to go from here as i feel this wasn't thoroughly discussed in the lesson

timezone.py
import datetime

import pytz

starter = pytz.utc.localize(datetime.datetime(2015, 10, 21, 23, 29))
to_timezone
AJ Tran
AJ Tran
Treehouse Teacher

Glad you figured it out! Sometimes taking a break is good so your "unconscious mind" can think about it. I'm hoping you can rest well! Good rest is key to good learning ;)

1 Answer

never mind, i was overthinking the question on little to no sleep.

def to_timezone(zstr): zone = pytz.timezone(zstr) return starter.astimezone(zone)