๐Ÿ‡ฎ๐Ÿ‡ณIndia @yogen.prasad

Account created on 4 July 2012, almost 12 years ago
#

Recent comments

๐Ÿ‡ฎ๐Ÿ‡ณIndia yogen.prasad

patch no #2 is working without any error. Can do RTBC

๐Ÿ‡ฎ๐Ÿ‡ณIndia yogen.prasad

comment no: #3 is working in my system.
Can move to RTBC

๐Ÿ‡ฎ๐Ÿ‡ณIndia yogen.prasad

I debug this issue and this is the root cause for the issue:

File: DateTimeFormatterBase.php

protected function buildDateWithIsoAttribute(DrupalDateTime $date) {
  // Create the ISO date in Universal Time.
  $iso_date = $date->format("Y-m-d\TH:i:s") . 'Z';

  $this->setTimeZone($date);

  $build = [
    '#theme' => 'time',
    '#text' => $this->formatDate($date),
    '#attributes' => [
      'datetime' => $iso_date,
    ],
    '#cache' => [
      'contexts' => [
        'timezone',
      ],
    ],
  ];

  return $build;
}

here line $this->setTimeZone($date);
is the reason for saving the invalid date.

๐Ÿ‡ฎ๐Ÿ‡ณIndia yogen.prasad

This patch 3364085-5.patch is working fine

๐Ÿ‡ฎ๐Ÿ‡ณIndia yogen.prasad

yogen.prasad โ†’ made their first commit to this issueโ€™s fork.

Production build 0.69.0 2024