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

Whats wrong with my code. Help

Now create a timezone variable named pacific that holds a timezone at UTC-08:00
import datetime
moscow = datetime.timezone(datetime.timedelta(hours=+4))

pacific = datetime.timezone(datetime.timedelta(hours =8))

2 Answers

Ken Stone
Ken Stone
25,868 Points

For pacific it's UTC-08:00


thank you Ken. it worked

Mahdi Jafari
Mahdi Jafari
16,299 Points

This is the code that worked for me

import datetime 
moscow = datetime.timezone(datetime.timedelta(hours=4))
pacific = datetime.timezone(datetime.timedelta(hours=-8))