Skip to content

Pipedrive CRM: activity due time is sent in the server's local time instead of UTC #30541

Open

Description

@Sanketmis208

Issue Summary

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

  1. Run Cal.diy with a non-UTC server timezone, for example TZ=Asia/Kolkata.
  2. Install Pipedrive CRM and enable it on an event type.
  3. Book a slot at 20:00 UTC on Nov 9.
  4. 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],                 // UTC
due_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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions