You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pipedrive CRM: activity due time is sent in the server's local time instead of UTC #30541
When Pipedrive CRM is connected, Cal.diy creates a Pipedrive activity for each booking. The activity's due_time is built from the server's local time, but its due_date comes from UTC, and Pipedrive reads both as UTC. On any server whose timezone isn't UTC, the activity lands at the wrong time, and near midnight on the wrong day. Updating the booking (reschedule) has the same problem.
Steps to Reproduce
Run Cal.diy with a non-UTC server timezone, for example TZ=Asia/Kolkata.
Install Pipedrive CRM and enable it on an event type.
Book a slot at 20:00 UTC on Nov 9.
Open the created activity in Pipedrive.
Actual Results
The activity is sent as due_date: "2026-11-09", due_time: "01:30". That is 01:30 UTC on Nov 9, 18½ hours before the real meeting.
Expected Results
due_date: "2026-11-09", due_time: "20:00", which is the booking's start time in UTC.
Technical details
In packages/app-store/pipedrive-crm/lib/CrmService.ts, createPipedriveActivity and updateActivity build the two fields from different clocks:
due_date: startDate.toISOString().split("T")[0],// UTCdue_time: startDate.toTimeString().split(" ")[0].substring(0,5),// server local time
Pipedrive documents due_time as "the due time of the activity in UTC". Both values should come from toISOString().
Evidence
A unit test that calls createEvent and updateEvent with process.env.TZ = "Asia/Kolkata" and checks the body sent to /activities receives due_time: "01:30" on main instead of "20:00".
Activity
fix(pipedrive): format activity due_time in UTC instead of server loc…
fix(pipedrive): format activity due_time in UTC instead of server loc…