Skip to content

[Bounty proposal] fix(clickup): a UTC due date is stored hours early and an offset one is silently dropped ($75 proposed) #15155

Closed

Description

@singhharsh1708

Summary

ClickUpClient.create_task (plugins/omi-clickup-app/clickup_client.py) turns an ISO due date into a ClickUp timestamp with:

dt_naive = datetime.fromisoformat(due_str.replace('Z', ''))
dt = tz.localize(dt_naive) if tz else dt_naive

tz is the user's pytz zone and pytz.localize is only valid on a naive datetime, so two inputs the model routinely produces break:

A UTC timestamp lands at the wrong moment. 2026-09-21T17:00:00Z has its Z stripped and the remaining wall clock is localized as the user's local time. For Asia/Kolkata the task is stored at 11:30 UTC, 5.5 hours early. Run against the shipped code path:

input: 2026-09-21T17:00:00Z
stored instant: 2026-09-21 11:30:00+00:00   correct: 2026-09-21 17:00:00+00:00

An offset timestamp loses its due date entirely. 2026-09-21T17:00:00+05:30 parses as aware, so localize raises ValueError: Not naive datetime (tzinfo is already set). The surrounding except Exception prints "Could not parse due date" and the key is never added, so the task is created with no due date, the tool still answers ✅ Task created in <list>, and notify_task_created(uid, task_name, list_name, due_date) notifies the user with the due date that was dropped.

Fix

Normalize a trailing Z to +00:00 and only call localize when the parsed datetime is naive; an aware value already identifies the instant.

PR with the fix and tests follows. The manifest lane has no pytz while production pins pytz==2023.3, so the tests install a small stand-in whose localize refuses an aware datetime the way pytz does, otherwise they would pass on main for the wrong reason.

Bounty: $75 proposed, since one case silently discards the due date while telling the user it was set.

cc @kodjima33 @josancamon19

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions