If you install Headless Lightning (or just Content API) and view the JSON for a content type with date time field, you will note that the field is in UTC but missing a timezone identifier. This is in violation of ISO 8601, and causes problems for consuming apps, which will generally assume that the field is local time, not UTC.
Note that this is probably an upstream issue, discussed here:
#2914779: Date field values are stored without timezone identifier
#2913941: [PP-1] Fields using the DateTimeIso8601 @DataType are missing an explicit time zone: missing a normalizer
There's no patches or good workarounds on the Drupal side at the moment, but I thought the Lightning team should be aware in case they can commit any resources to it, or start getting support request from other Lightning users.
On the consuming side, the workaround is to configure your application to expect UTC dates, such as by appending a "Z" to the timestamp.
Original issue: https://github.com/acquia/lightning/issues/482
Comments
Comment #2
danepowell commentedComment #3
phenaproximaComment #4
wim leersAFAICT #2929932: Work around core's ill-designed @FieldType-level TimestampItemNormalizer normalization until #2926508 lands fixed this in JSON API 2.x.
Comment #5
wim leers#2929932: Work around core's ill-designed @FieldType-level TimestampItemNormalizer normalization until #2926508 lands landed last month. Updating to JSON API 2.x will fix this.
Comment #6
wim leersLightning API updated to JSON:API 2.x a few months ago.