Skip to content
Snippets Groups Projects
Commit c63dd209 authored by catch's avatar catch
Browse files

Issue #1987856 by mparker17, vijaycs85, sidharthap, disasm, ianmthomasuk:...

Issue #1987856 by mparker17, vijaycs85, sidharthap, disasm, ianmthomasuk: Convert system_timezone() to a new style controller.
parent aa05c211
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -36,6 +36,20 @@ public function setUp() {
}
/**
* Test that the AJAX Timezone Callback can deal with various formats.
*/
public function testSystemTimezone() {
$options = array(
'query' => array(
'date' => 'Tue+Sep+17+2013+21%3A35%3A31+GMT%2B0100+(BST)#',
)
);
// Query the AJAX Timezone Callback with a long-format date.
$response = $this->drupalGet('system/timezone/BST/3600/1', $options);
$this->assertEqual($response, '"Europe\/London"', 'Timezone AJAX callback successfully identifies and responds to a long-format date.');
}
/**
* Test that DrupalDateTime can detect the right timezone to use.
* Test with a variety of less commonly used timezone names to
......
......@@ -344,9 +344,12 @@ system.modules_uninstall_confirm:
_permission: 'administer modules'
system.timezone:
path: '/system/timezone'
path: '/system/timezone/{abbreviation}/{offset}/{is_daylight_saving_time}'
defaults:
_controller: '\Drupal\system\Controller\TimezoneController::getTimezone'
abbreviation: ''
offset: -1
is_daylight_saving_time: NULL
requirements:
_access: 'TRUE'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment