Deployment schedule anchor dates aren't working as...
# prefect-getting-started
a
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
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
ah brilliant
Ah no, IDK how that typo got in to my copy pasta but its not in my code