function system_timezone

system_timezone($abbreviation = '', $offset = -1, $is_daylight_saving_time = NULL)

Menu callback; Retrieve a JSON object containing a suggested time zone name.

File

modules/system/ system.module, line 3408
Configuration system that lets administrators modify the workings of the site.

Code

function system_timezone($abbreviation = '', $offset = -1, $is_daylight_saving_time = NULL) {
  // An abbreviation of "0" passed in the callback arguments should be
  // interpreted as the empty string.
  $abbreviation = $abbreviation ? $abbreviation : '';
  $timezone = timezone_name_from_abbr($abbreviation, intval($offset), $is_daylight_saving_time);
  drupal_json_output($timezone);
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!system!system.module/function/system_timezone/7.x