Adam Vasik6,651 Points
Turning naive into aware datetime..
I tried hill_valey = naive.astimezone(pacific), it prints datetime it should print but here it throws a bummer.. I also tried hill_valey = naive.replace(tzinfo=pacific), what this does it doesn't modify naive when printed, prints "datetime - timezone'' #OUTPUT: 2015-10-21 04:29:00-08:00
import datetime naive = datetime.datetime(2015, 10, 21, 4, 29) pacific = datetime.timezone(datetime.timedelta(hours=-8)) hill_valey = naive.astimezone(pacific)
Steven Parker204,010 Points
In addtion to the spelling of "hill_valey" instead of "hill_valley", the instructions ask for "
naive with its
replaced...", and the different font used for the word "
replace" hints at a different operation than the one normally used for adjusting the value as you might do with a previously localized datetime:
hill_valey = naive.astimezone(pacific) # original hill_valley = naive.replace(tzinfo=pacific) # corrected