function date_array2unix in Date 5
3 calls to date_array2unix()
- date_offset in ./
date.inc - A function to calculate offset using timezone.inc file
- date_selector_make_dbdate in ./
date.inc - Construct a value to save to the database from the date selector
- date_unset_granularity in ./
date.inc - Unset undesired date part values.
File
- ./
date.inc, line 1161 - Date/time API functions
Code
function date_array2unix($array) {
if (!date_is_valid($array, 'array')) {
return 'ERROR';
}
// a date without a month and day cannot be made into a unix timestamp
if (!$array['mon'] || !$array['mday']) {
return NULL;
}
// using gmmktime instead of mktime so no server timezone adjustment is made
return date_gmmktime($array);
}