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 Maker

Manuel Avila
Manuel Avila
2,241 Points

Create a variable named moscow that holds a datetime.timezone object at +4 hours.

import datetime moscow = datetime.timezone(datetime.timedelta(hours=5))

not sure why it wont pass

timezones.py
import datetime 
moscow = datetime.timezone(datetime.timedelta(hours=5))

3 Answers

Greg Kaleka
Greg Kaleka
39,021 Points

Hey Manuel,

You're using 5 when the challenge states the offset should be 4.

Cheers :beers:

-Greg

Manuel Avila
Manuel Avila
2,241 Points

Thank you, simple typo was ruining my day

Greg Kaleka
Greg Kaleka
39,021 Points

Hah yep, they tend to do that!

This is how I did it

import datetime 
moscow = datetime.timezone(datetime.timedelta(hours=4))