function TimezoneTest::testDatetimeElementTimesUnderstoodCorrectly
Same name in other branches
- 9 core/tests/Drupal/KernelTests/Core/Datetime/Element/TimezoneTest.php \Drupal\KernelTests\Core\Datetime\Element\TimezoneTest::testDatetimeElementTimesUnderstoodCorrectly()
- 8.9.x core/tests/Drupal/KernelTests/Core/Datetime/Element/TimezoneTest.php \Drupal\KernelTests\Core\Datetime\Element\TimezoneTest::testDatetimeElementTimesUnderstoodCorrectly()
- 11.x core/tests/Drupal/KernelTests/Core/Datetime/Element/TimezoneTest.php \Drupal\KernelTests\Core\Datetime\Element\TimezoneTest::testDatetimeElementTimesUnderstoodCorrectly()
Tests datetime elements interpret their times correctly when saving.
Initial times are inevitably presented to the user using a timezone, and so the time must be interpreted using the same timezone when it is time to save the form, otherwise stored times may be changed without the user changing the element's values.
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Datetime/ Element/ TimezoneTest.php, line 208
Class
- TimezoneTest
- Tests the timezone handling of datetime and datelist element types.
Namespace
Drupal\KernelTests\Core\Datetime\ElementCode
public function testDatetimeElementTimesUnderstoodCorrectly() : void {
$this->assertTimesUnderstoodCorrectly('datetime', [
'date',
'time',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.