Skip to main content

Automation dates or times are off

Fix a date or time that's an hour off or on the wrong day in an automation. Learn why scripts use UTC and how to convert dates to your time zone.

Written by Leo

Tip: Learn how dates work in automations. Automations run in UTC, and the people who use Tape work in their own time zone. Learn more about Dates and time zones →

The action Execute a script with the code var_target_datetime = date_fns_tz.zonedTimeToUtc(new Date('2026-11-10 15:00'), 'Europe/Amsterdam') in the automation Set the meeting time in UTC

If a date set by a script is a few hours off

Perform calculation and Execute script read and write dates in UTC. If your team works in another time zone, a date you write in a script lands a few hours earlier or later than you meant. A script reads a text such as 2026-11-10 15:00 as UTC. If your team works in Central European Time (UTC+1), the record then shows a time that is one hour off.

How to fix it

Convert the date from your time zone to UTC before you save it. Use the date_fns_tz.zonedTimeToUtc function with the name of your time zone:

var_target_datetime = date_fns_tz.zonedTimeToUtc(new Date('2026-11-10 15:00'), 'Europe/Amsterdam');

Then select Manual run on a test record and check the date before you rely on the automation. Learn more about Execute script →

If a date is on the wrong day

A date and the same date in UTC can fall on different days when the time is close to midnight. For example, a task due at 00:30 Central European Time is still the day before in UTC.

How to fix it

Use the date value in the automation's time zone for text that people read. The variable name tells you which one you have: a name that ends in _utc holds UTC, the same name without the ending holds the automation's time zone. When you set a date field with a script, use the UTC values. Learn more about Record values and variables →

If a whole-day date shifts

A date field with no time holds a whole calendar day. Tape doesn't convert a whole day between time zones, so the day is the same for everyone and it has no start time.

How to fix it

If a script expects a start time, check whether the field has a time. Add a time to the field, or handle the case without a time in your script.

If an email or a record shows a date in the wrong format

Dates in automations are written as YYYY-MM-DD HH:mm:ss for a date with time, YYYY-MM-DD for a date, and HH:mm:ss for a time. One display value shows date and time as one text without seconds, for example 2026-11-10 15:00.

How to fix it

Format the date with the date_fns library. For example, date_fns.format(your_date_value, 'y') returns the year. Learn more about Dates and time zones →

If a scheduled automation runs at the wrong time

Every automation has its own time zone. The triggers On a scheduled time or interval and When a date field arrives use this time zone, and so do date filters. Scripts can read it from the variable Timezone under Automation. A new automation uses the time zone from the profile of the person who creates it.

How to fix it

  1. Open the automation.

  2. Hover over the area above the automation name. The time zone appears, for example Time zone UTC+01:00.

  3. Select it and choose your time zone from the list, or type in Search for a time zone….

  4. Check the time of the trigger, then select Save changes.

Hovering above the automation name Expense approval shows Time zone UTC+01:00, and selecting it opens the list of time zones with Search for a time zone…

If a date filter returns the wrong records

A date filter compares dates in the automation's time zone, so a date near midnight can fall on another day. For a relative date, such as Current date with - and an amount, use Days as the unit. For one week, enter 7 days. Check the time zone, then test with Manual run on a test record. Learn more about My filter doesn't match →

Tip: Still having trouble? Ask in the Tape community and include an example of the date you expected and the one you got.

Learn more

FAQs

Why does my script use UTC?

Automations run in UTC so they behave the same for every team, wherever they are. Built-in actions convert dates for you. Scripts don't.

Do built-in actions have the same problem?

No. When a built-in action such as Update the current record copies a date from one field to another, the value matches what people see in the record.

Why is the date in my email different from the date on the record?

If an email shows a different date, it could be because:

  • The value comes from a _utc variable. Use the one without the ending.

  • The date is close to midnight, so UTC is on another day.

  • A script changed the date before the email.

Check it with Show preview and Simulate variables in the email step.

Does daylight saving time change the result?

No, not for schedules. Automations use named time zones such as Europe/Amsterdam, which include daylight saving time. A scheduled automation set to 3:00 PM runs at 3:00 PM local time before and after the change.

Still have questions? Find answers and get help from community experts in the Tape community →

Did this answer your question?