You are here

function date_gmmktime in Date 5

Same name and namespace in other branches
  1. 5.2 date_php4/date_php4.inc \date_gmmktime()
  2. 6.2 date_php4/date_php4.inc \date_gmmktime()
  3. 6 date_php4/date_php4.inc \date_gmmktime()
5 calls to date_gmmktime()
date_array2unix in ./date.inc
date_fuzzy_stamp in ./date.inc
Create a valid timestamp that can be used for date formatting even if only partial date info is available, i.e. for an iso date with month and year only
date_iso2unix in ./date.inc
date_last_day_of_month in ./date.inc
Find the last day of a month
date_views_browser_period_start_stamp in ./date_views.inc
Find the timestamp for the beginning of the period of the analyzed date arg

File

./date.inc, line 104
Date/time API functions

Code

function date_gmmktime($array) {
  date_load_library();
  switch (DATE_LIBRARY) {
    case 'ADODB':
      $timestamp = @adodb_gmmktime(intval($array['hours']), intval($array['minutes']), intval($array['seconds']), max(intval($array['mon']), 1), max(intval($array['mday']), 1), intval($array['year']) > 0 ? intval($array['year']) : date('Y'));
      return $timestamp;
    default:
      $timestamp = @gmmktime(intval($array['hours']), intval($array['minutes']), intval($array['seconds']), max(intval($array['mon']), 1), max(intval($array['mday']), 1), intval($array['year']) > 0 ? intval($array['year']) : date('Y'));
      return $timestamp;
  }
}