Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create/Updating an item in a flow fails when using timestamp with timezone. #21210

Closed
jonathan-james-dev opened this issue Jan 26, 2024 · 1 comment

Comments

@jonathan-james-dev
Copy link

jonathan-james-dev commented Jan 26, 2024

Describe the Bug

I am using Supabase for my database and have a table that has several columns with the datatype "TIMESTAMP WITH TIME ZONE" to store date and times in UTC format.

I have created a flow that when triggered, creates a new item, passing the payload with the field name and string representation of the date with time zone.

When the create executes I the following error message from the flow, stating that my ISO 8601 date is not valid:

Reponse:

{
  "name": "Error",
  "message": "date must have a valid date format or reference"
}

Payload:

{
  "collection": "schedules",
  "permissions": "$full",
  "emitEvents": true,
  "payload": {
    "end_date": "2024-01-26T00:00:00.000Z"
  },
  "query": {
    "filter": {
      "id": {
        "_eq": "28149"
      }
    }
  }
}

To Reproduce

  1. Create a flow to create an item with a field with "TIMESTAMP WITH TIME ZONE" data type
  2. Create a datetime string with a timezone like so: "2024-01-25T00:00:00.000Z" or "2024-01-25T00:00:00Z" or "2024-01-25T00:00:00"

Directus Version

v10.8.3

Hosting Strategy

Self-Hosted (Docker Image)

@jonathan-james-dev jonathan-james-dev changed the title Create/Updating an item in a flow fails when using datetime with timezone. Create/Updating an item in a flow fails when using timestamp with timezone. Jan 26, 2024
@hanneskuettner
Copy link
Member

I can not reproduce this issue in the current version of Directus (v10.10.7) with neither Postgres nor SQLite drivers and can create the items with the datetime field as expected.

I'll proceed to close this issue, if this still is a issue for you on the most recent version of Directus, I'll happily reopen this.

@hanneskuettner hanneskuettner closed this as not planned Won't fix, can't repro, duplicate, stale May 7, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

3 participants