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 trialSam Cerwinske
Courses Plus Student 2,876 Pointscode challenge: timezone strings
I'm not really sure where to go from here as i feel this wasn't thoroughly discussed in the lesson
import datetime
import pytz
starter = pytz.utc.localize(datetime.datetime(2015, 10, 21, 23, 29))
to_timezone
1 Answer
Sam Cerwinske
Courses Plus Student 2,876 Pointsnever mind, i was overthinking the question on little to no sleep.
def to_timezone(zstr): zone = pytz.timezone(zstr) return starter.astimezone(zone)
AJ Tran
Treehouse TeacherAJ Tran
Treehouse TeacherGlad 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 ;)