V8-archive: API saves ISO datetime wrong

Created on 2 Nov 2018  Â·  6Comments  Â·  Source: directus/v8-archive

Bug Report

If I send 1995-12-29T08:00+02:00 to the api, it saves 1995-12-29 08:00 disregarding the timezone.

enhancement

Most helpful comment

There's three format supported all include full date and time.

Example:

Using time offset
2019-01-04T16:12:05+00:00

Ussing Z
2019-01-04T16:12:05Z

Using Z without Dashes
20190104T161205Z

Implemented by https://github.com/directus/api/commit/93a0dfac2a698e8251085e651df82d83847f00be

All 6 comments

The format in your example is missing the seconds. Unfortunately the API only supports on ISO date time format 1995-12-29T08:00:00+02:00.

Ideally will be great to support all date time formats.

The problem here is that we need to confirm is an ISO format before trying to convert them to UTC. It need to rethink how date time are save.

@rijkvanzanten – for now can we just have interfaces always submit with seconds?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This is actually not a bug, but a feature request to support more ISO formats, rather than just 1995-12-29T08:00:00+02:00. For example, without minutes or minutes and seconds.

There's three format supported all include full date and time.

Example:

Using time offset
2019-01-04T16:12:05+00:00

Ussing Z
2019-01-04T16:12:05Z

Using Z without Dashes
20190104T161205Z

Implemented by https://github.com/directus/api/commit/93a0dfac2a698e8251085e651df82d83847f00be

Was this page helpful?
0 / 5 - 0 ratings

Related issues

magikstm picture magikstm  Â·  3Comments

rijkvanzanten picture rijkvanzanten  Â·  3Comments

cdwmhcc picture cdwmhcc  Â·  3Comments

Nitwel picture Nitwel  Â·  3Comments

vuhrmeister picture vuhrmeister  Â·  3Comments