function _webform_submit_time in Webform 6.3
Same name and namespace in other branches
- 7.4 components/time.inc \_webform_submit_time()
- 7.3 components/time.inc \_webform_submit_time()
Implements _webform_submit_component().
File
- components/
time.inc, line 281 - Webform module time component.
Code
function _webform_submit_time($component, $value) {
// Convert to 24-hour time before string conversion.
if ($component['extra']['hourformat'] == '12-hour') {
$value = webform_time_convert($value, '24-hour');
}
// Convert the value into a ISO 8601 string.
return $value['hour'] !== '' ? webform_date_string($value, 'time') : '';
}