https://prefect.io logo
#prefect-getting-started
Title
# prefect-getting-started
a

Austin Weisgrau

04/12/2023, 10:43 PM
Deployment schedule anchor dates aren't working as I expect. I suspect a timezone issue but not sure how to resolve. I set:
Copy code
Deployment.schedule = IntervalSchedule(
    interval=datetime.timedelta(days=1),
    anchor_date=datetime.datetime.today().replace(
       hour=9, minute=0, second=0
    ),
    timezone="America/New_York"
)
I would expect the Deployment to be scheduled to run at 9am EST every day. Instead, it is scheduled 4 hours later than that. If it is relevant, the computer I'm executing this from is in US/Pacific time. Here's my prefect version info:
Copy code
Version:             2.8.2
API version:         0.8.4
Python version:      3.10.9
Git commit:          afbed19d
Built:               Fri, Feb 17, 2023 10:02 AM
OS/Arch:             linux/x86_64
Profile:             default
Server type:         cloud
r

Ryan Peden

04/13/2023, 2:04 AM
It looks like there's a typo in your
timezone
. I believe it should be
America/New_York
instead of
American/New_York
. Since
IntervalSchedule
doesn't recognize the timezone, it defaults to UTC - 4 hours ahead of EDT.
a

Austin Weisgrau

04/13/2023, 4:20 PM
ah brilliant
Ah no, IDK how that typo got in to my copy pasta but its not in my code