Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292435

[PP-1] Let DateTimeItem denormalize from ISO8601 timestamps *with* timezones, for better DX

$
0
0

Problem/Motivation

  1. #2824717: Add a format constraint to DateTimeItem to provide REST error message added a validation constraint. This already improves the REST DX (== RX). Because now REST clients are at least told what they're doing wrong.
  2. But we should go further: we should allow POSTing and PATCHing with datetime fields having values in any timezone.

Proposed resolution

Do something similar to #2768651: Let TimestampItem (de)normalize to/from RFC3339 timestamps, not UNIX timestamps, for better DX:

  1. implement a DateTimeItemNormalizer class
  2. with a denormalize() method that denormalizes from any timezone back to UTC

Remaining tasks

TBD

User interface changes

None.

API changes

None.

Data model changes

None.


Viewing all articles
Browse latest Browse all 292435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>