function system_date_time_lookup
Return the date for a given format string via Ajax.
1 string reference to 'system_date_time_lookup'
- system_menu in modules/
system/ system.module - Implements hook_menu().
File
-
modules/
system/ system.admin.inc, line 2213
Code
function system_date_time_lookup() {
// This callback is protected with a CSRF token because user input from the
// query string is reflected in the output.
if (!isset($_GET['token']) || !drupal_valid_token($_GET['token'], 'admin/config/regional/date-time/formats/lookup')) {
return MENU_ACCESS_DENIED;
}
$result = format_date(REQUEST_TIME, 'custom', $_GET['format']);
drupal_json_output($result);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.